# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.664 2006/10/02 20:41:53 wolf31o2 Exp $
+ 27 Dec 2006; Chris Gianelloni <wolf31o2@gentoo.org>
+ modules/generic_stage_target.py:
+ Changed the portage_overlay option to always install overlays in
+ /usr/local/portage and added code to clean up /usr/local/portage and
+ make.conf after sucessful execution and before creation of ISO/tarballs.
+
22 Dec 2006; Chris Gianelloni <wolf31o2@gentoo.org>
targets/support/livecdfs-update.sh:
Fixed a typo which broke coldplugging.
"/etc/portage","Error copying /etc/portage",env=self.env)
touch(self.settings["autoresume_path"]+"setup_confdir")
- def portage_overlay(self):
- # copy over the portage overlays
- # Always copy over the overlay incase it has changed
+ def portage_overlay(self):
+ # Here, we copy the contents of our overlays to /usr/local/portage. We
+ # always copy over the overlays in case it has changed.
if self.settings.has_key("portage_overlay"):
for x in self.settings["portage_overlay"]:
if os.path.exists(x):
print "Copying overlay dir " +x
- cmd("mkdir -p "+self.settings["chroot_path"]+x,"Could not make portage_overlay dir",env=self.env)
- #cmd("rsync -a --delete "+x+"/* "+self.settings["chroot_path"]+x,\
- cmd("rsync -a --delete "+x+"/ "+self.settings["chroot_path"]+x,\
- "Could not copy portage_overlay",env=self.env)
- #cmd("cp -R "+x+"/* "+self.settings["chroot_path"]+x,"Could not copy portage_overlay",env=self.env)
+ cmd("mkdir -p "+self.settings["chroot_path"]+"/usr/local/portage","Could not make portage_overlay dir",env=self.env)
+ cmd("cp -R "+x+"/* "+self.settings["chroot_path"]+"/usr/local/portage","Could not copy portage_overlay",env=self.env)
def root_overlay(self):
# copy over the root_overlay
# Setup the portage overlay
if self.settings.has_key("portage_overlay"):
- myf.write('PORTDIR_OVERLAY="'+string.join(self.settings["portage_overlay"])+'"\n')
+# myf.write('PORTDIR_OVERLAY="'+string.join(self.settings["portage_overlay"])+'"\n')
+ myf.write('PORTDIR_OVERLAY="/usr/local/portage"\n')
myf.close()
touch(self.settings["autoresume_path"]+"chroot_setup")
cmd("rm -rf "+self.settings["destpath"]+x,"Couldn't clean "+x,env=self.env)
# put /etc/hosts back into place
- if os.path.exists(self.settings["chroot_path"]+"/etc/hosts.bck"):
- cmd("mv -f "+self.settings["chroot_path"]+"/etc/hosts.bck "+self.settings["chroot_path"]+\
- "/etc/hosts", "Could not replace /etc/hosts",env=self.env)
-
+ if os.path.exists(self.settings["chroot_path"]+"/etc/hosts.bck"):
+ cmd("mv -f "+self.settings["chroot_path"]+"/etc/hosts.bck "+self.settings["chroot_path"]+"/etc/hosts", "Could not replace /etc/hosts",env=self.env)
+
+ # remove our overlay
+ if os.path.exists(self.settings["chroot_path"]+"/usr/local/portage"):
+ cmd("rm -rf "+self.settings["chroot_path"]+"/usr/local/portage", "Could not remove /usr/local/portage",env=self.env)
+ cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+"/etc/make.conf", "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)
+
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+" clean","clean script failed.",env=self.env)
touch(self.settings["autoresume_path"]+"clean")