# ChangeLog for gentoo/src/catalyst
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.79 2004/08/31 01:40:24 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.80 2004/09/07 14:04:24 zhen Exp $
+
+ 07 Sep 2004; John Davis <zhen@gentoo.org> modules/generic_stage_target.py,
+ modules/livecd_stage2_target.py:
+ fix for bug #63033, thanks to usata@gentoo.org for the patch
30 Aug 2004; John Davis <zhen@gentoo.org>
livecd/runscript-support/livecdfs-update.sh, targets/grp/grp-chroot.sh:
# Distributed under the GNU General Public License version 2
# Copyright 2003-2004 Gentoo Technologies, Inc.
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.11 2004/08/13 16:00:48 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.12 2004/09/07 14:04:24 zhen Exp $
"""
This class does all of the chroot setup, copying of files, etc. It is
except:
self.unbind()
- raise
+ raise CatalystError, "Build failed, could not execute preclean"
def capture(self):
"""capture target in a tarball"""
os.environ[varname]=string.join(self.settings[x])
self.run_local()
- if self.settings["target"] in ["stage1","stage2","stage3","livecd-stage2"]:
+ if self.settings["target"] in ["stage1","stage2","stage3","livecd-stage1","livecd-stage2"]:
self.preclean()
if self.settings["target"] in ["livecd-stage2"]:
self.unmerge()
+
+ # unbind everything here so that we can clean()
self.unbind()
# kill distcc processes outside of the chroot
if self.settings.has_key("DISTCC"):
cmd("/usr/bin/pkill -U 7980","could not kill distcc process(es)")
- if self.settings["target"] in ["stage1","stage2","stage3","livecd-stage2"]:
+ if self.settings["target"] in ["stage1","stage2","stage3","livecd-stage1","livecd-stage2"]:
# clean is for removing things after bind-mounts are
# unmounted (general file removal and cleanup)
self.clean()
# Distributed under the GNU General Public License version 2
# Copyright 2003-2004 Gentoo Technologies, Inc.
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.19 2004/09/06 04:52:06 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.20 2004/09/07 14:04:24 zhen Exp $
"""
Builder class for a LiveCD stage2 build.
os.makedirs(self.settings["chroot_path"])
print "Copying livecd-stage1 result to new livecd-stage2 work directory..."
- cmd("rsync -a --delete "+self.settings["source_path"]+"/* "+self.settings["chroot_path"],"Error copying initial livecd-stage2")
+ cmd("rsync -a --delete "+self.settings["source_path"]+"/* "+self.settings["chroot_path"],\
+ "Error copying initial livecd-stage2")
+ if os.path.exists(self.settings["chroot_path"]+"/usr/portage"):
+ print "Cleaning up existing portage tree snapshot..."
+ cmd("rm -rf "+self.settings["chroot_path"]+"/usr/portage",\
+ "Error removing existing snapshot directory.")
+
+ print "Unpacking portage tree snapshot..."
+ cmd("tar xjpf "+self.settings["snapshot_path"]+" -C "+\
+ self.settings["chroot_path"]+"/usr","Error unpacking snapshot")
+
print "Configuring profile link..."
cmd("rm -f "+self.settings["chroot_path"]+"/etc/make.profile","Error zapping profile link")
cmd("ln -sf ../usr/portage/profiles/"+self.settings["target_profile"]+" "