setup the portage_confdir key to use a bind mount
Created attachment 47223 [details, diff] patch for /usr/lib/catalyst/modules/generic_stage_target.py patch for a bind mount to portage_confdir (/etc/portage). test and let me know what happens. If successful, I will add the patch to CVS.
output from trial: # catalyst -dVf /etc/catalyst/stage1/x86/x86/x86-stage1.kn-srvr.2004-12-31.12-25-42.-0600.spec Gentoo Catalyst, version 1.1.0 Copyright 2003-2004 The Gentoo Foundation Distributed under the GNU General Public License version 2 Using default Catalyst configuration file, /etc/catalyst/catalyst.conf Setting storedir to default value "/var/tmp/catalyst" Setting portdir to default value "/usr/portage" Setting distdir to config file value "/usr/portage/distfiles" Setting options to config file value "ccache pkgcache kerncache" Setting sharedir to config file value "/usr/lib/catalyst" Compiler cache support enabled. Package cache support enabled. Kernel cache support enabled. Envscript support enabled. Building natively for x86 Setting up directories... Running command "rm -rf /var/tmp/catalyst/tmp/default/stage1-x86-kn-srvr.2004-12-31.12-25-42.-0600" Unpacking stage tarball... Running command "tar xjpf /var/tmp/catalyst/builds/default/stage3-x86-try2-2004.3.tar.bz2 -C /var/tmp/catalyst/tmp/default/stage1-x86-kn-srvr.2004-12-31.12-25-42.-0600" Cleaning up existing portage tree snapshot... Running command "rm -rf /var/tmp/catalyst/tmp/default/stage1-x86-kn-srvr.2004-12-31.12-25-42.-0600/usr/portage" Unpacking portage tree snapshot... Running command "tar xjpf /var/tmp/catalyst/snapshots/portage-kn-srvr.2004-12-31.12-25-42.-0600.tar.bz2 -C /var/tmp/catalyst/tmp/default/stage1-x86-kn-srvr.2004-12-31.12-25-42.-0600/usr" Configuring profile link... Running command "rm -f /var/tmp/catalyst/tmp/default/stage1-x86-kn-srvr.2004-12-31.12-25-42.-0600/etc/make.profile" Running command "ln -sf ../usr/portage/profiles/default-linux/x86/2004.3 /var/tmp/catalyst/tmp/default/stage1-x86-kn-srvr.2004-12-31.12-25-42.-0600/etc/make.profile" !!! catalyst: could not complete build
it didn't matter if my portage_confdir was a symlink or a normal directory, got the same output either way
Created attachment 47347 [details, diff] portage_confdir bind mount patch give this patch a whirl, it worked on my machine. apply the patch to the modules directory. let me know what happens!
I haven't tested the patch yet. It might be best not to implement a bind mount for portage_confdir. Using a bind mount would allow the user to change the files while catalyst is running. That's probably bad and I can't think of a valid use case. Using a separate copy is probably better than using a bind mount. Since this was originally inspired by a desire for portage_confdir to work even if it was a symbolic link, I tested cp's behaviour with symlinks. If /path/symlink is a symbolic link to /path/dir: # cp -R /path/symlink /path/cp-target makes /path/cp-target a symlink to /path/dir # cp -R /path/symlink/ /path/cp-target (note the trailing slash on /path/symlink/) copies the contents of /path/dir to a new directory /path/cp-target if cp-target does not already exist or to /path/cp-target/symlink if cp-target already exists. So I suggest, instead of using a bind mount, doing this: # rm -rf $targetTempRoot/etc/portage # cp -R ${portage_confdir}/ $targetTempRoot/etc/portage I will go ahead and test your portage_confdir bind mount patch unless I hear from you that you don't want me to.
looks like the bind is backwards, see this mount excerpt while a build is running: /usr/portage/distfiles on /var/tmp/catalyst/tmp/default/stage1-x86-kn-srvr.2005-01-06.21-16-26.-0600/usr/portage/distfiles type none (rw,bind) /etc/portage on /var/tmp/catalyst/tmp/default/stage1-x86-kn-srvr.2005-01-06.21-16-26.-0600/etc/catalyst/etc-portage/kn-srvr type none (rw,bind) /var/tmp/catalyst/packages/default/stage1-x86-kn-srvr.2005-01-06.21-16-26.-0600 on /var/tmp/catalyst/tmp/default/stage1-x86-kn-srvr.2005-01-06.21-16-26.-0600/usr/portage/packages type none (rw,bind) /root/.ccache on /var/tmp/catalyst/tmp/default/stage1-x86-kn-srvr.2005-01-06.21-16-26.-0600/var/tmp/ccache type none (rw,bind)
hm, ok, having catalyst copy the drive would probably be advantageous for the reasons that you stated. I will add your fix to CVS, thanks for all of the testing!
Catalyst 1.1.2 is now out!