From 3abcfcab13205cfcabb28bf866ea12ca44bce3f3 Mon Sep 17 00:00:00 2001 From: Eric Edgar Date: Fri, 16 Dec 2005 14:42:07 +0000 Subject: [PATCH] Fix warning message in stage1,2 and 3. Fix tab spacing issues in various other files git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@969 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 9 ++++++++- modules/livecd_stage1_target.py | 18 +++++++++--------- modules/livecd_stage2_target.py | 17 +++++++++-------- modules/stage1_target.py | 11 ++++++----- modules/stage2_target.py | 13 +++++++------ modules/stage3_target.py | 13 +++++++------ modules/stage4_target.py | 13 ++++++------- 7 files changed, 52 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a0dabd3..01152629 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.456 2005/12/14 15:04:22 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.457 2005/12/16 14:42:07 rocket Exp $ + + 16 Dec 2005; Eric Edgar + modules/livecd_stage1_target.py, modules/livecd_stage2_target.py, + modules/stage1_target.py, modules/stage2_target.py, + modules/stage3_target.py, modules/stage4_target.py: + Fix warning message in stage1,2 and 3. Fix tab spacing issues in various + other files 14 Dec 2005; Eric Edgar modules/generic_stage_target.py: diff --git a/modules/livecd_stage1_target.py b/modules/livecd_stage1_target.py index b45ded39..19142185 100644 --- a/modules/livecd_stage1_target.py +++ b/modules/livecd_stage1_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.25 2005/12/08 22:02:05 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.26 2005/12/16 14:42:07 rocket Exp $ """ Builder class for LiveCD stage1. @@ -52,19 +52,19 @@ class livecd_stage1_target(generic_stage_target): self.settings["use"]=["livecd"] def set_packages(self): - generic_stage_target.set_packages(self) - if self.settings.has_key(self.settings["spec_prefix"]+"/packages"): - if type(self.settings[self.settings["spec_prefix"]+"/packages"]) == types.StringType: - self.settings[self.settings["spec_prefix"]+"/packages"] = \ - self.settings[self.settings["spec_prefix"]+"/packages"].split() + generic_stage_target.set_packages(self) + if self.settings.has_key(self.settings["spec_prefix"]+"/packages"): + if type(self.settings[self.settings["spec_prefix"]+"/packages"]) == types.StringType: + self.settings[self.settings["spec_prefix"]+"/packages"] = \ + self.settings[self.settings["spec_prefix"]+"/packages"].split() self.settings[self.settings["spec_prefix"]+"/packages"].append("livecd-tools") def set_pkgcache_path(self): if self.settings.has_key("pkgcache_path"): - if type(self.settings["pkgcache_path"]) != types.StringType: - self.settings["pkgcache_path"]=normpath(string.join(self.settings["pkgcache_path"])) + if type(self.settings["pkgcache_path"]) != types.StringType: + self.settings["pkgcache_path"]=normpath(string.join(self.settings["pkgcache_path"])) else: - generic_stage_target.set_pkgcache_path(self) + generic_stage_target.set_pkgcache_path(self) def register(foo): foo.update({"livecd-stage1":livecd_stage1_target}) diff --git a/modules/livecd_stage2_target.py b/modules/livecd_stage2_target.py index 8955dda5..e5e6b80e 100644 --- a/modules/livecd_stage2_target.py +++ b/modules/livecd_stage2_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.55 2005/12/05 18:13:12 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.56 2005/12/16 14:42:07 rocket Exp $ """ Builder class for a LiveCD stage2 build. @@ -29,18 +29,18 @@ class livecd_stage2_target(generic_stage_target): generic_stage_target.__init__(self,spec,addlargs) if not self.settings.has_key("livecd/type"): - self.settings["livecd/type"] = "generic-livecd" + self.settings["livecd/type"] = "generic-livecd" file_locate(self.settings, ["cdtar","controller_file"]) def set_source_path(self): self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2") - if os.path.isfile(self.settings["source_path"]): - self.settings["source_path_md5sum"]=calc_md5(self.settings["source_path"]) - else: - self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/") + if os.path.isfile(self.settings["source_path"]): + self.settings["source_path_md5sum"]=calc_md5(self.settings["source_path"]) + else: + self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/") if not os.path.exists(self.settings["source_path"]): - raise CatalystError,"Source Path: "+self.settings["source_path"]+" does not exist." + raise CatalystError,"Source Path: "+self.settings["source_path"]+" does not exist." def set_spec_prefix(self): self.settings["spec_prefix"]="livecd" @@ -67,10 +67,12 @@ class livecd_stage2_target(generic_stage_target): except: self.unbind() raise CatalystError,"Couldn't open "+self.settings["chroot_path"]+"/etc/hotplug/blacklist." + myf.write("\n#Added by Catalyst:") for x in self.settings["livecd/modblacklist"]: myf.write("\n"+x) myf.close() + def unpack(self): unpack=True @@ -94,7 +96,6 @@ class livecd_stage2_target(generic_stage_target): if unpack: self.mount_safety_check() - if invalid_snapshot: print "No Valid Resume point detected, cleaning up ..." #os.remove(self.settings["autoresume_path"]+"dir_setup") diff --git a/modules/stage1_target.py b/modules/stage1_target.py index 578f859c..f98099f7 100644 --- a/modules/stage1_target.py +++ b/modules/stage1_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.18 2005/12/13 20:32:43 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.19 2005/12/16 14:42:07 rocket Exp $ """ Builder class for a stage1 installation tarball build. @@ -30,10 +30,11 @@ class stage1_target(generic_stage_target): def set_portage_overlay(self): generic_stage_target.set_portage_overlay(self) - print "\nWARNING !!!!!" - print "\tUsing an overlay for earlier stages could cause build issues." - print "\tIf you break it, you buy it. Don't complain to us about it." - print "\tDont say we did not warn you\n" + if self.settings.has_key("portage_overlay"): + print "\nWARNING !!!!!" + print "\tUsing an portage overlay for earlier stages could cause build issues." + 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({"stage1":stage1_target}) return foo diff --git a/modules/stage2_target.py b/modules/stage2_target.py index e2331fa0..4f262818 100644 --- a/modules/stage2_target.py +++ b/modules/stage2_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage2_target.py,v 1.9 2005/12/13 20:32:43 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage2_target.py,v 1.10 2005/12/16 14:42:07 rocket Exp $ """ Builder class for a stage2 installation tarball build. @@ -57,11 +57,12 @@ class stage2_target(generic_stage_target): self.settings["LDFLAGS"]=list_to_string(self.settings["ldflags"]) def set_portage_overlay(self): - generic_stage_target.set_portage_overlay(self) - print "\nWARNING !!!!!" - print "\tUsing an overlay for earlier stages could cause build issues." - print "\tIf you break it, you buy it. Don't complain to us about it." - print "\tDont say we did not warn you\n" + generic_stage_target.set_portage_overlay(self) + if self.settings.has_key("portage_overlay"): + print "\nWARNING !!!!!" + print "\tUsing an portage overlay for earlier stages could cause build issues." + 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): diff --git a/modules/stage3_target.py b/modules/stage3_target.py index f60d5d25..d833191e 100644 --- a/modules/stage3_target.py +++ b/modules/stage3_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage3_target.py,v 1.5 2005/12/13 20:32:43 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage3_target.py,v 1.6 2005/12/16 14:42:07 rocket Exp $ """ Builder class for a stage3 installation tarball build. @@ -16,11 +16,12 @@ class stage3_target(generic_stage_target): generic_stage_target.__init__(self,spec,addlargs) def set_portage_overlay(self): - generic_stage_target.set_portage_overlay(self) - print "\nWARNING !!!!!" - print "\tUsing an overlay for earlier stages could cause build issues." - print "\tIf you break it, you buy it. Don't complain to us about it." - print "\tDont say we did not warn you\n" + generic_stage_target.set_portage_overlay(self) + if self.settings.has_key("portage_overlay"): + print "\nWARNING !!!!!" + print "\tUsing an overlay for earlier stages could cause build issues." + 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({"stage3":stage3_target}) diff --git a/modules/stage4_target.py b/modules/stage4_target.py index 50561dfa..b1d30c2b 100644 --- a/modules/stage4_target.py +++ b/modules/stage4_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage4_target.py,v 1.12 2005/12/02 20:09:03 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage4_target.py,v 1.13 2005/12/16 14:42:07 rocket Exp $ """ Builder class for LiveCD stage1. @@ -11,7 +11,6 @@ from generic_stage_target import * class stage4_target(generic_stage_target): def __init__(self,spec,addlargs): - #self.required_values=["stage4/use"] self.required_values=[] self.valid_values=self.required_values[:] self.valid_values.extend(["stage4/use", "stage4/packages", "stage4/root_overlay", "stage4/fsscript", \ @@ -19,11 +18,11 @@ class stage4_target(generic_stage_target): generic_stage_target.__init__(self,spec,addlargs) def set_pkgcache_path(self): - if self.settings.has_key("pkgcache_path"): - if type(self.settings["pkgcache_path"]) != types.StringType: - self.settings["pkgcache_path"]=normpath(string.join(self.settings["pkgcache_path"])) - else: - generic_stage_target.set_pkgcache_path(self) + if self.settings.has_key("pkgcache_path"): + if type(self.settings["pkgcache_path"]) != types.StringType: + self.settings["pkgcache_path"]=normpath(string.join(self.settings["pkgcache_path"])) + else: + generic_stage_target.set_pkgcache_path(self) def set_cleanables(self): self.settings["cleanables"]=["/var/tmp/*","/tmp/*"] -- 2.26.2