# 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 $
+ 22 Nov 2006; Chris Gianelloni <wolf31o2@gentoo.org>
+ modules/generic_stage_target.py, modules/stage1_target.py,
+ modules/stage2_target.py:
+ Added cleanup patch for stage1/stage2 and generic_stage_target from Andrew
+ Gaffney <agaffney@gentoo.org> wrt bug #155911.
+
22 Nov 2006; Chris Gianelloni <wolf31o2@gentoo.org>
targets/grp/grp-chroot.sh, targets/livecd-stage1/livecd-stage1-chroot.sh,
targets/netboot/netboot-chroot.sh, targets/netboot2/netboot2-pkg.sh,
self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/")
else:
self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2")
-
if os.path.isfile(self.settings["source_path"]):
- if os.path.exists(self.settings["source_path"]):
- self.settings["source_path_hash"]=generate_hash(self.settings["source_path"],\
- hash_function=self.settings["hash_function"],verbose=False)
+ if os.path.exists(self.settings["source_path"]): # XXX: Is this even necessary if the previous check passes?
+ self.settings["source_path_hash"]=generate_hash(self.settings["source_path"],\
+ hash_function=self.settings["hash_function"],verbose=False)
+ print "Source path set to "+self.settings["source_path"]
if os.path.isdir(self.settings["source_path"]):
- print "Source path set to "+self.settings["source_path"]
print "\tIf this is not desired, remove this directory or turn of seedcache in the options of catalyst.conf"
- print "\tthe source path with then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2\n")
- else:
- print "Source path set to "+self.settings["source_path"]
+ print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2\n")
-
def set_dest_path(self):
if self.settings.has_key("root_path"):
self.settings["destpath"]=normpath(self.settings["chroot_path"]+self.settings["root_path"])
"/usr/lib/python2.4/email", "/usr/lib/python2.4/lib-tk",\
"/usr/share/zoneinfo"])
+ # XXX: How do these override_foo() functions differ from the ones in generic_stage_target and why aren't they in stage3_target?
+
def override_chost(self):
if self.settings.has_key("chost"):
self.settings["CHOST"]=list_to_string(self.settings["chost"])
self.required_values=[]
self.valid_values=[]
generic_stage_target.__init__(self,spec,addlargs)
- def set_root_path(self):
- # ROOT= variable for emerges
- self.settings["root_path"]=normpath("/tmp/stage1root")
-
+
def set_source_path(self):
- self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/"+self.settings["root_path"]+"/")
-
- # reset the root path so the preclean doesnt fail
- generic_stage_target.set_root_path(self)
-
- if os.path.isdir(self.settings["source_path"]):
- print "\nUsing seed-stage from "+self.settings["source_path"]
- print "Delete this folder if you wish to use a seed stage tarball instead\n"
+ if self.settings.has_key("SEEDCACHE") and os.path.isdir(normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/")):
+ self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/")
else:
self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2")
if os.path.isfile(self.settings["source_path"]):
- if os.path.exists(self.settings["source_path"]):
- self.settings["source_path_hash"]=generate_hash(self.settings["source_path"])
+ if os.path.exists(self.settings["source_path"]): # XXX: Is this even necessary if the previous check passes?
+ self.settings["source_path_hash"]=generate_hash(self.settings["source_path"],\
+ hash_function=self.settings["hash_function"],verbose=False)
+ print "Source path set to "+self.settings["source_path"]
+ if os.path.isdir(self.settings["source_path"]):
+ print "\tIf this is not desired, remove this directory or turn of seedcache in the options of catalyst.conf"
+ print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2\n")
+ # XXX: How do these override_foo() functions differ from the ones in generic_stage_target and why aren't they in stage3_target?
+
def override_chost(self):
if self.settings.has_key("chost"):
self.settings["CHOST"]=list_to_string(self.settings["chost"])
print "\tIf you break it, you buy it. Don't complain to us about it."
print "\tDont say we did not warn you\n"
-
def register(foo):
foo.update({"stage2":stage2_target})
return foo