Fix warning message in stage1,2 and 3. Fix tab spacing issues in various other files
authorEric Edgar <rocket@gentoo.org>
Fri, 16 Dec 2005 14:42:07 +0000 (14:42 +0000)
committerEric Edgar <rocket@gentoo.org>
Fri, 16 Dec 2005 14:42:07 +0000 (14:42 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@969 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
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

index 4a0dabd303c928fc8d31f46696222dc25026c462..0115262990a3ef5839c62f045136d46cc2589c9d 100644 (file)
--- 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 <rocket@gentoo.org>
+  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 <rocket@gentoo.org>
   modules/generic_stage_target.py:
index b45ded39f44a354e32ffe17f6e677c3953fe3df4..19142185f8745ae1288eab40bdb3a5dcd21ff7b4 100644 (file)
@@ -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})
index 8955dda52bb83acf8fe8189d8c8fd22556287374..e5e6b80e3e62d214f0d8f995024516bd68a89c5a 100644 (file)
@@ -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")
index 578f859c6dda2a555463d8b00361f9f8c514d08d..f98099f78f4d9b7f5ef8152dbd6b057462eeedd4 100644 (file)
@@ -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
index e2331fa00bb8c6cc65d0de4faa5ed95434da5695..4f26281841332922a0a48a62cec4590e5e47f782 100644 (file)
@@ -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):
index f60d5d256a0692474194ebc05dc49ab5da4077e8..d833191e6c55d52ef5a38159dc166e18f96d4d97 100644 (file)
@@ -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})
index 50561dfa0265fe74286c4329905fc22c132f31c8..b1d30c2b81176910e0de363ee11779c2d461db3e 100644 (file)
@@ -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/*"]