From: Chris Gianelloni Date: Wed, 22 Nov 2006 16:27:15 +0000 (+0000) Subject: Fixed up action_sequence when using --fetchonly to not create tarballs or ISO images... X-Git-Tag: CATALYST_2_0_6_916~304 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9be28ed19d53a5504a6adb0ab1f46b25bc5b6f45;p=catalyst.git Fixed up action_sequence when using --fetchonly to not create tarballs or ISO images for bug #143392. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1190 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index 7d9f3030..c883a607 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ # 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 catalyst, + modules/generic_stage_target.py, modules/livecd_stage2_target.py, + modules/stage2_target.py, modules/stage4_target.py: + Fixed up action_sequence when using --fetchonly to not create tarballs or + ISO images for bug #143392. + 22 Nov 2006; Chris Gianelloni targets/grp/grp-chroot.sh, targets/stage4/stage4-chroot.sh: Clean up the USE usage in GRP/stage4. diff --git a/catalyst b/catalyst index 0a237c7a..6c11fb2c 100755 --- a/catalyst +++ b/catalyst @@ -105,9 +105,9 @@ def parse_config(myconfig): print "Cleaning autoresume flags support enabled." conf_values["CLEAR_AUTORESUME"]="1" - if "compress" in string.split(conf_values["options"]): - print "Compression enabled." - conf_values["COMPRESS"]="1" +# if "compress" in string.split(conf_values["options"]): +# print "Compression enabled." +# conf_values["COMPRESS"]="1" if "distcc" in string.split(conf_values["options"]): print "Distcc support enabled." @@ -133,9 +133,9 @@ def parse_config(myconfig): print "Snapshot cache support enabled." conf_values["SNAPCACHE"]="1" - if "tarball" in string.split(conf_values["options"]): - print "Tarball creation enabled." - conf_values["TARBALL"]="1" +# if "tarball" in string.split(conf_values["options"]): +# print "Tarball creation enabled." +# conf_values["TARBALL"]="1" if myconf.has_key("digests"): conf_values["digests"]=myconf["digests"] diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index c2a97400..477af627 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -396,12 +396,14 @@ class generic_stage_target(generic_target): self.settings["iso_volume_id"] = "catalyst " + self.settings["snapshot"] def set_action_sequence(self): - #Default action sequence for run method + # Default action sequence for run method self.settings["action_sequence"]=["unpack","unpack_snapshot",\ "config_profile_link","setup_confdir","portage_overlay",\ "base_dirs","bind","chroot_setup","setup_environment",\ "run_local","preclean","unbind","clean"] - if not self.settings.has_key("TARBALL"): +# if self.settings.has_key("TARBALL") or \ +# not self.settings.has_key("FETCH"): + if not self.settings.has_key("FETCH"): self.settings["action_sequence"].append("capture") self.settings["action_sequence"].append("clear_autoresume") diff --git a/modules/livecd_stage2_target.py b/modules/livecd_stage2_target.py index 01c96b2b..a8e2fdc7 100644 --- a/modules/livecd_stage2_target.py +++ b/modules/livecd_stage2_target.py @@ -126,10 +126,13 @@ class livecd_stage2_target(generic_stage_target): self.settings["action_sequence"]=["unpack","unpack_snapshot",\ "config_profile_link","setup_confdir","portage_overlay",\ "bind","chroot_setup","setup_environment","run_local",\ - "build_kernel","bootloader","preclean","livecd_update", - "root_overlay","fsscript","rcupdate","unmerge",\ + "build_kernel"] + if not self.settings.has_key("FETCH"): + self.settings["action_sequence"].append("bootloader","preclean",\ + "livecd_update","root_overlay","fsscript","rcupdate","unmerge",\ "unbind","remove","empty","target_setup",\ - "setup_overlay","create_iso","clear_autoresume"] + "setup_overlay","create_iso"] + self.settings["action_sequence"].append("clear_autoresume"] def register(foo): foo.update({"livecd-stage2":livecd_stage2_target}) diff --git a/modules/stage2_target.py b/modules/stage2_target.py index dbbffba7..6b3a6bcb 100644 --- a/modules/stage2_target.py +++ b/modules/stage2_target.py @@ -19,7 +19,8 @@ class stage2_target(generic_stage_target): 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"]): # XXX: Is this even necessary if the previous check passes? + 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"] @@ -27,7 +28,8 @@ class stage2_target(generic_stage_target): 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? + # 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"): diff --git a/modules/stage4_target.py b/modules/stage4_target.py index 8dee8d3d..e2daab30 100644 --- a/modules/stage4_target.py +++ b/modules/stage4_target.py @@ -29,7 +29,9 @@ class stage4_target(generic_stage_target): "preclean","rcupdate","unmerge","unbind","remove","empty",\ "clean"] - if self.settings.has_key("TARBALL"): +# if self.settings.has_key("TARBALL") or \ +# not self.settings.has_key("FETCH"): + if not self.settings.has_key("FETCH"): self.settings["action_sequence"].append("capture") self.settings["action_sequence"].append("clear_autoresume")