The attached patch is the complete patch I've written to be able to generate stage1, 2 and 3 for Gentoo/FreeBSD:
- the /dev/pts mounts does not exists for *BSD, so I've added it only for Linux;
- mount --bind on FreeBSD is achieved by mount_nullfs, and /dev has to be mounted on its own because it is setup in a special way every time (there's no static /dev for FreeBSD that could work);
- on umount, we need to avoid the // on the joining between mypath and the mountpoint or it will fail to find the point;
- when cleaning up, chflags removes the immutable flag so that the freebsd base ebuilds can be remove correctly (there's no easy way to do this in Python, the only way to set flags is either with the portage module (that's half an hack) or with py-freebsd module (that does not have a recursive function anyway));
- the find command is used in a BSD-compatible way, by specifying the path where it has to look;
- as readlink -f does not work on *BSD, if realpath is present (it is part of FreeBSD's base system) it uses that instead of readlink -f (this has a slight impact on Linux in theory, as app-admin/realpath could be used, but it's unlikely to happen inside a stage).
I didn't put the code to remove freebsd-sources from the stage2 as rebuilding it with pkgcache enabled should solve that (like emerge --with-bdeps=n --depclean could do).
Created attachment 99025 [details, diff]
I've added this to catalyst SVN... it'll be in the next catalyst release.
Fixed in 2.0.1