So I was just kidding on that last commit. This one is 2.0_rc4.
authorChris Gianelloni <wolf31o2@gentoo.org>
Fri, 2 Dec 2005 20:09:03 +0000 (20:09 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Fri, 2 Dec 2005 20:09:03 +0000 (20:09 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@931 d1e1f19c-881f-0410-ab34-b69fee027534

12 files changed:
ChangeLog
modules/catalyst_lock.py
modules/catalyst_support.py
modules/embedded_target.py
modules/generic_stage_target.py
modules/grp_target.py
modules/livecd_stage1_target.py
modules/livecd_stage2_target.py
modules/netboot_target.py
modules/stage1_target.py
modules/stage4_target.py
modules/tinderbox_target.py

index e6e86f3aa1b2805d039653508385e8aed768aea5..7263a2cd84bfaa2c8aceb07dab4a1d4525250d6e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.418 2005/12/02 19:37:01 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.419 2005/12/02 20:09:03 wolf31o2 Exp $
+
+  02 Dec 2005; Chris Gianelloni <wolf31o2@gentoo.org>
+  modules/catalyst_lock.py, modules/catalyst_support.py,
+  modules/embedded_target.py, modules/generic_stage_target.py,
+  modules/grp_target.py, modules/livecd_stage1_target.py,
+  modules/livecd_stage2_target.py, modules/netboot_target.py,
+  modules/stage1_target.py, modules/stage4_target.py,
+  modules/tinderbox_target.py:
+  So I was just kidding on that last commit.  This one is 2.0_rc4.
 
   02 Dec 2005; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
   modules/catalyst_lock.py, modules/catalyst_support.py,
index 6341831546162bd46f596a791f1aaa49cb55ee06..ff8eaa0202f03a3f0e3a9c38577187d2b4a7538b 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_lock.py,v 1.5 2005/12/02 19:37:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_lock.py,v 1.6 2005/12/02 20:09:03 wolf31o2 Exp $
 import os
 import fcntl
 import errno
@@ -11,8 +11,8 @@ import time
 from catalyst_support import *
 
 def writemsg(mystr):
-        sys.stderr.write(mystr)
-        sys.stderr.flush()
+       sys.stderr.write(mystr)
+       sys.stderr.flush()
 
 #def normpath(mypath):
 #newpath = os.path.normpath(mypath)
@@ -30,8 +30,8 @@ class LockDir:
        self.clean_my_hardlocks()
        self.delete_lock_from_path_list()
        if self.islocked():
-               self.fcntl_unlock()
-       def __init__(self,lockdir):
+           self.fcntl_unlock()
+    def __init__(self,lockdir):
        self.locked=False
        self.myfd=None
        self.set_gid(250)
index 321236fb24452684790c604c55f1e32f85dd1249..4ab2efbb93a131ce73c97fdfcf001d6194d19490 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/catalyst_support.py,v 1.61 2005/12/02 19:37:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.62 2005/12/02 20:09:03 wolf31o2 Exp $
 
 import sys,string,os,types,re,signal,traceback,md5,sha,time
 selinux_capable = False
@@ -56,12 +56,12 @@ def cleanup(pids,block_exceptions=True):
 # a function to turn a string of non-printable characters into a string of
 # hex characters
 def hexify(str):
-       hexStr = string.hexdigits
-       r = ''
-       for ch in str:
+    hexStr = string.hexdigits
+    r = ''
+    for ch in str:
        i = ord(ch)
        r = r + hexStr[(i >> 4) & 0xF] + hexStr[i & 0xF]
-       return r
+    return r
 # hexify()
 
 # A function to calculate the md5 sum of a file
@@ -188,7 +188,7 @@ def warn(msg):
 
 
 def find_binary(myc):
-        """look through the environmental path for an executable file named whatever myc is"""
+       """look through the environmental path for an executable file named whatever myc is"""
         # this sucks. badly.
         p=os.getenv("PATH")
         if p == None:
index 98cab48526ffd5408d7dddf1263234d74728b0f0..a088aadf1658a5f5c44ecf857ec2b8e00caaa23c 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/embedded_target.py,v 1.17 2005/12/02 19:37:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/embedded_target.py,v 1.18 2005/12/02 20:09:03 wolf31o2 Exp $
 
 """
 This class works like a 'stage3'.  A stage2 tarball is unpacked, but instead
@@ -19,7 +19,7 @@ from stat import *
 
 class embedded_target(generic_stage_target):
 
-       def __init__(self,spec,addlargs):
+    def __init__(self,spec,addlargs):
         self.required_values=[]
         self.valid_values=[]
         self.valid_values.extend(["embedded/empty","embedded/rm","embedded/unmerge","embedded/fs-prepare","embedded/fs-finish","embedded/mergeroot","embedded/packages","embedded/fs-type","embedded/runscript","boot/kernel"])
@@ -50,5 +50,5 @@ class embedded_target(generic_stage_target):
        self.settings["destpath"]=normpath(self.settings["chroot_path"]+self.settings["root_path"])
                
 def register(foo):
-        foo.update({"embedded":embedded_target})
-        return foo
+       foo.update({"embedded":embedded_target})
+       return foo
index 43533688902abe2992a3268de90140a76d98e281..a751077e0792f392c9e82d1a9e54e5c5359f7353 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/generic_stage_target.py,v 1.86 2005/12/02 19:37:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.87 2005/12/02 20:09:03 wolf31o2 Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -90,7 +90,7 @@ class generic_stage_target(generic_target):
                                msg("Can't find "+x+".py plugin in "+self.settings["sharedir"]+"/arch/")
                
                # call arch constructor, pass our settings
-                try:
+               try:
                         self.arch=self.subarchmap[self.settings["subarch"]](self.settings)
                 except:
                         print "Invalid subarch: "+self.settings["subarch"]
@@ -190,7 +190,7 @@ class generic_stage_target(generic_target):
        
        def override_chost(self):
                if os.environ.has_key("CHOST"):
-                       self.settings["CHOST"] = os.environ["CHOST"]
+                   self.settings["CHOST"] = os.environ["CHOST"]
                if self.settings.has_key("chost"):
                    self.settings["CHOST"]=list_to_string(self.settings["chost"])
                if self.makeconf.has_key("CHOST"):
index 48639daf8b0538386e67664fcae70a392c1e1ce4..fce1650077b08c9d925c1e33a5598333fb2240e5 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/grp_target.py,v 1.20 2005/12/02 19:37:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/grp_target.py,v 1.21 2005/12/02 20:09:03 wolf31o2 Exp $
 
 """
 The builder class for GRP (Gentoo Reference Platform) builds.
@@ -24,8 +24,8 @@ class grp_target(generic_stage_target):
                        addlargs["grp"]=[addlargs["grp"]]
                
                if addlargs.has_key("grp/use"):
-                       if type(addlargs["grp/use"])==types.StringType:
-                               addlargs["grp/use"]=[addlargs["grp/use"]]
+                   if type(addlargs["grp/use"])==types.StringType:
+                           addlargs["grp/use"]=[addlargs["grp/use"]]
                        
                for x in addlargs["grp"]:
                        self.required_values.append("grp/"+x+"/packages")
@@ -33,7 +33,7 @@ class grp_target(generic_stage_target):
                        
                generic_stage_target.__init__(self,spec,addlargs)
 
-        def set_target_path(self):
+       def set_target_path(self):
                 self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+"/")
                 if self.settings.has_key("AUTORESUME") \
                         and os.path.exists(self.settings["autoresume_path"]+"setup_target_path"):
index 3076abc09551846281e2b4f91f4954c3a56cdf2d..5626119317ba8973e35402ee4c742922151ffa7b 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.22 2005/12/02 19:37:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.23 2005/12/02 20:09:03 wolf31o2 Exp $
 
 """
 Builder class for LiveCD stage1.
@@ -23,7 +23,7 @@ class livecd_stage1_target(generic_stage_target):
                                        "config_profile_link","setup_confdir","portage_overlay",\
                                        "bind","chroot_setup","setup_environment","build_packages",\
                                        "unbind", "clean","clear_autoresume"]
-        def set_target_path(self):
+       def set_target_path(self):
                self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"])
                if self.settings.has_key("AUTORESUME") \
                        and os.path.exists(self.settings["autoresume_path"]+"setup_target_path"):
@@ -45,8 +45,8 @@ class livecd_stage1_target(generic_stage_target):
                        self.settings["spec_prefix"]="livecd"
        
        def set_use(self):
-               generic_stage_target.set_use(self)
-               self.settings["use"].append("livecd")
+           generic_stage_target.set_use(self)
+           self.settings["use"].append("livecd")
 
        def set_packages(self):
            generic_stage_target.set_packages(self)
index 9f4f9b8e3c9a196e57010946b69c093fc1d39c29..069deb9d8837b38c36bfed94f123564aa5a7490b 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.53 2005/12/02 19:37:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.54 2005/12/02 20:09:03 wolf31o2 Exp $
 
 """
 Builder class for a LiveCD stage2 build.
@@ -29,7 +29,7 @@ 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"])
        
@@ -71,7 +71,7 @@ class livecd_stage2_target(generic_stage_target):
                        for x in self.settings["livecd/modblacklist"]:
                                myf.write("\n"+x)
                        myf.close()
-        def unpack(self):
+       def unpack(self):
                 unpack=True
 
                 clst_unpack_md5sum=read_from_clst(self.settings["autoresume_path"]+"unpack")
index d6f72d858ece6aa60ce50a1aa02f8e0378e8b60c..673b37f7f5d9634058dbad503f6dca89c2e7dba9 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/netboot_target.py,v 1.8 2005/12/02 19:37:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/netboot_target.py,v 1.9 2005/12/02 20:09:03 wolf31o2 Exp $
 
 """
 Builder class for a netboot build.
@@ -53,7 +53,7 @@ class netboot_target(generic_stage_target):
                                self.settings[envvar] = "-Os -pipe"
        
 
-#              def set_root_path(self):
+#      def set_root_path(self):
 #              # ROOT= variable for emerges
 #              self.settings["root_path"]="/tmp/image"
 
index f8f226ce1eaeda4d248f8ebe85a0399556227c97..b3a1f4203e9401ecc1db5c68e47951c6e1cebcfd 100644 (file)
@@ -1,57 +1,38 @@
 # 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.14 2005/12/02 19:37:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.15 2005/12/02 20:09:03 wolf31o2 Exp $
 
 """
-Builder class for a stage1 installation tarball build.
+Builder class for a stage2 installation tarball build.
 """
 
 from catalyst_support import *
 from generic_stage_target import *
 
-class stage1_target(generic_stage_target):
+class stage2_target(generic_stage_target):
        def __init__(self,spec,addlargs):
                self.required_values=[]
                self.valid_values=[]
                generic_stage_target.__init__(self,spec,addlargs)
-       
-       def set_stage_path(self):
-               self.settings["stage_path"]=normpath(self.settings["chroot_path"]+self.settings["root_path"])
-               print "stage1 stage path is "+self.settings["stage_path"]
        def set_root_path(self):
                # ROOT= variable for emerges
-               self.settings["root_path"]=normpath("/tmp/stage1root")
-               print "stage1 root path is "+self.settings["root_path"]
-       def set_dest_path(self):
-                self.settings["destpath"]=normpath(self.settings["chroot_path"]+self.settings["root_path"])
-       def set_cleanables(self):
-               generic_stage_target.set_cleanables(self)
-               self.settings["cleanables"].extend(["/usr/share/gettext","/usr/lib/python2.2/test", "/usr/lib/python2.2/encodings","/usr/lib/python2.2/email", "/usr/lib/python2.2/lib-tk","/usr/share/zoneinfo"])
-
-       def override_chost(self):
-           if os.environ.has_key("CHOST"):
-               self.settings["CHOST"] = os.environ["CHOST"]
-           if self.settings.has_key("chost"):
-               self.settings["CHOST"]=list_to_string(self.settings["chost"])
-
-       def override_cflags(self):
-           if os.environ.has_key("CFLAGS"):
-               self.settings["CFLAGS"] = os.environ["CFLAGS"]
-           if self.settings.has_key("cflags"):
-               self.settings["CFLAGS"]=list_to_string(self.settings["cflags"])
-
-       def override_cxxflags(self):
-           if os.environ.has_key("CXXFLAGS"):
-               self.settings["CXXFLAGS"] = os.environ["CXXFLAGS"]
-           if self.settings.has_key("cxxflags"):
-               self.settings["CXXFLAGS"]=list_to_string(self.settings["cxxflags"])
-
-        def override_ldflags(self):
-           if os.environ.has_key("LDFLAGS"):
-               self.settings["LDFLAGS"] = os.environ["LDFLAGS"]
-           if self.settings.has_key("ldflags"):
-               self.settings["LDFLAGS"]=list_to_string(self.settings["ldflags"])
+                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"
+            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_md5sum"]=calc_md5(self.settings["source_path"])
 
 def register(foo):
-       foo.update({"stage1":stage1_target})
+       foo.update({"stage2":stage2_target})
        return foo
index 0f844533d53a68e60e472d106956d5a4dec79093..50561dfa0265fe74286c4329905fc22c132f31c8 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.11 2005/12/02 19:37:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage4_target.py,v 1.12 2005/12/02 20:09:03 wolf31o2 Exp $
 
 """
 Builder class for LiveCD stage1.
@@ -19,10 +19,10 @@ 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 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:
+                   self.settings["pkgcache_path"]=normpath(string.join(self.settings["pkgcache_path"]))
+           else:
                generic_stage_target.set_pkgcache_path(self)
 
        def set_cleanables(self):
@@ -39,3 +39,4 @@ class stage4_target(generic_stage_target):
 def register(foo):
        foo.update({"stage4":stage4_target})
        return foo
+
index c380c345a509edea758b7c106e74c97f06b31f27..1636c8f9fb4348b4226e85ea63549c6f3236e87a 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/tinderbox_target.py,v 1.16 2005/12/02 19:37:02 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/tinderbox_target.py,v 1.17 2005/12/02 20:09:03 wolf31o2 Exp $
 
 """
 builder class for the tinderbox target
@@ -21,14 +21,14 @@ class tinderbox_target(generic_stage_target):
                # example call: "grp.sh run xmms vim sys-apps/gleep"
                try:
                        if os.path.exists(self.settings["controller_file"]):
-                               cmd("/bin/bash "+self.settings["controller_file"]+" run "+\
+                           cmd("/bin/bash "+self.settings["controller_file"]+" run "+\
                                list_bashify(self.settings["tinderbox/packages"]),"run script failed.")
                
                except CatalystError:
                        self.unbind()
                        raise CatalystError,"Tinderbox aborting due to error."
 
-        def set_pkgcache_path(self):
+       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"]))