# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.568 2006/02/10 15:48:23 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.569 2006/02/10 23:01:21 rocket Exp $
+
+ 10 Feb 2006; Eric Edgar <rocket@gentoo.org>
+ modules/generic_stage_target.py:
+ Allow multiple overlays for root_overlay and overlay spec option
10 Feb 2006; Chris Gianelloni <wolf31o2@gentoo.org>
-livecd/cdtar/yaboot-1.3.11-ppc-cdtar-r1.tar.bz2,
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.127 2006/02/09 00:46:11 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.128 2006/02/10 23:01:21 rocket Exp $
"""
This class does all of the chroot setup, copying of files, etc. It is
self.set_packages()
self.set_rm()
self.set_linuxrc()
+ self.set_overlay()
self.set_portage_overlay()
+ self.set_root_overlay()
# this next line checks to make sure that the specified variables exist on disk.
#pdb.set_trace()
if type(self.settings["portage_overlay"])==types.StringType:
self.settings["portage_overlay"]=self.settings["portage_overlay"].split()
print "portage_overlay directories are set to: \"" + string.join(self.settings["portage_overlay"])+"\""
+
+ def set_overlay(self):
+ if self.settings.has_key(self.settings["spec_prefix"]+"/overlay"):
+ if type(self.settings[self.settings["spec_prefix"]+"/overlay"])==types.StringType:
+ self.settings[self.settings["spec_prefix"]+"/overlay"]=self.settings[self.settings["spec_prefix"]+"/overlay"].split()
+
+ def set_root_overlay(self):
+ if self.settings.has_key(self.settings["spec_prefix"]+"/root_overlay"):
+ if type(self.settings[self.settings["spec_prefix"]+"/root_overlay"])==types.StringType:
+ self.settings[self.settings["spec_prefix"]+"/root_overlay"]=self.settings[self.settings["spec_prefix"]+"/root_overlay"].split()
+
def set_root_path(self):
# ROOT= variable for emerges
def root_overlay(self):
# copy over the root_overlay
# Always copy over the overlay incase it has changed
- if self.settings.has_key(self.settings["spec_prefix"]+"/root_overlay"):
- print "Copying root overlay ..."
- cmd("rsync -a "+self.settings[self.settings["spec_prefix"]+"/root_overlay"]+"/ "+\
- self.settings["chroot_path"], self.settings["spec_prefix"]+"/root_overlay copy failed.",env=self.env)
+ for x in self.settings[self.settings["spec_prefix"]+"/root_overlay"]:
+ if os.path.exists(x):
+ if self.settings.has_key(self.settings["spec_prefix"]+"/root_overlay"):
+ print "Copying root_overlay: "+x
+ cmd("rsync -a "+x+"/ "+\
+ self.settings["chroot_path"], self.settings["spec_prefix"]+"/root_overlay: "+x+" copy failed.",env=self.env)
def bind(self):
for x in self.mounts:
touch(self.settings["autoresume_path"]+"target_setup")
def setup_overlay(self):
- if self.settings.has_key("AUTORESUME") \
+ if self.settings.has_key("AUTORESUME") \
and os.path.exists(self.settings["autoresume_path"]+"setup_overlay"):
- print "Resume point detected, skipping setup_overlay operation..."
- else:
- if self.settings.has_key(self.settings["spec_prefix"]+"/overlay") \
- and os.path.exists(self.settings[self.settings["spec_prefix"]+"/overlay"]):
- cmd("rsync -a "+self.settings[self.settings["spec_prefix"]+"/overlay"]+"/ "+\
- self.settings["target_path"], self.settings["spec_prefix"]+"overlay copy failed.",env=self.env)
+ print "Resume point detected, skipping setup_overlay operation..."
+ else:
+ if self.settings.has_key(self.settings["spec_prefix"]+"/overlay"):
+ for x in self.settings[self.settings["spec_prefix"]+"/overlay"]:
+ if os.path.exists(x):
+ cmd("rsync -a "+x+"/ "+\
+ self.settings["target_path"], self.settings["spec_prefix"]+"overlay: "+x+" copy failed.",env=self.env)
touch(self.settings["autoresume_path"]+"setup_overlay")
def create_iso(self):