Added patches from Eric Edgar <e_edgar@hotmail.com> from bug #70663 to separate out...
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 16 Dec 2004 23:13:24 +0000 (23:13 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 16 Dec 2004 23:13:24 +0000 (23:13 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@499 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
catalyst
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.py
modules/stage1_target.py
modules/tinderbox_target.py

index 01934dc84a57a1b1e4e64e09c1fd9ed10fb0bc8a..a88f21f2b461525101182ef0c7e65ae2001e132b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
 # ChangeLog for gentoo/src/catalyst 
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.126 2004/12/16 20:01:38 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.127 2004/12/16 23:13:24 wolf31o2 Exp $
+
+  16 Dec 2004; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
+  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.py, modules/stage1_target.py, modules/tinderbox_target.py:
+  Added patches from Eric Edgar <e_edgar@hotmail.com> from bug #70663 to
+  separate out specific target logic from the generic targets modules.
 
   16 Dec 2004; Chris Gianelloni <wolf31o2@gentoo.org>
   modules/embedded_target.py, targets/embedded/embedded-fs-runscript.sh,
index 4ab0ce7b60b6c2f7d903b70d25095575f8c10f23..3536cf0a06567d53f3c962f94caa7b8dfb9655d1 100755 (executable)
--- a/catalyst
+++ b/catalyst
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.53 2004/11/07 13:51:55 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.54 2004/12/16 23:13:24 wolf31o2 Exp $
 
 # Maintained in full by John Davis <zhen@gentoo.org>
 
@@ -287,5 +287,5 @@ if __name__ == "__main__":
        try:
                build_target(addlargs, targetmap)
        except:
-               print "!!! catalyst: could not complete build"
+               raise CatalystError,"could not complete build"
                sys.exit(2)
index 86a47b5f4cda3f9e43d0a634c518f2b5226221e4..83de6ec6edaca446c92c6764377e8382aa78bd44 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 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.30 2004/10/21 17:06:21 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.31 2004/12/16 23:13:24 wolf31o2 Exp $
 
 import sys,string,os,types,re
 
@@ -43,6 +43,9 @@ class CatalystError(Exception):
                if message:
                        print
                        print "!!! catalyst: "+message
+
+                       #Uncomment the line below if you need more detailed debugging messages
+                       #raise
                        
 def die(msg=None):
        warn(msg)
index 26c0eaa673ecda4f17066f06afc2ef7348b399ce..8e18953242c6a3c8f20aafe049addc7bdccd86fd 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 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.4 2004/12/16 20:01:38 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/embedded_target.py,v 1.5 2004/12/16 23:13:24 wolf31o2 Exp $
 
 """
 This class works like a 'stage3'.  A stage2 tarball is unpacked, but instead
@@ -74,6 +74,15 @@ class embedded_target(generic_stage_target):
            self.clean()
             self.build_fs()
 
+    def set_action_sequence(self):
+       self.settings["action_sequence"]=["dir_setup","unpack_and_bind","chroot_setup",\
+                                       "setup_environment","run_local","unbind","capture"]
+       
+    def set_use(self):
+        self.settings["use"]=self.settings["embedded/use"]
+    def set_stage_path(self):
+        self.settings["stage_path"]=self.settings["chroot_path"]+"/tmp/mergeroot"
+       print "embedded stage path is "self.settings["stage_path"]
 def register(foo):
         foo.update({"embedded":embedded_target})
         return foo
index 382fc783c2c105ed0a8d071bf168b0627fc04ae1..50aad78a3ec06c9376e94ca65963952419ab1093 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 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.17 2004/11/23 00:02:57 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.18 2004/12/16 23:13:24 wolf31o2 Exp $
 
 """
 This class does all of the chroot setup, copying of files, etc. It is
@@ -98,31 +98,16 @@ class generic_stage_target(generic_target):
                                self.settings[envvar] = os.environ[envvar]
                
                # define all of our core variables
-               self.settings["target_profile"]=self.settings["profile"]
-               self.settings["target_subpath"]=self.settings["rel_type"]+"/"+self.settings["target"]+\
-                       "-"+self.settings["subarch"]+"-"+self.settings["version_stamp"]
-                       
-               st=self.settings["storedir"]
-               self.settings["snapshot_path"]=st+"/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2"
-               if self.settings["target"] in ["grp","tinderbox"]:
-                       # grp creates a directory of packages and sources rather than a compressed tarball
-                       self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]
-                       self.settings["source_path"]=st+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
-               
-               elif self.settings["target"] == "livecd-stage2":
-                       self.settings["source_path"]=st+"/tmp/"+self.settings["source_subpath"]
-                       self.settings["cdroot_path"]=st+"/builds/"+self.settings["target_subpath"]
-                       
-               elif self.settings["target"] == "netboot":
-                       self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]
-                       self.settings["source_path"]=st+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
-               
-               else:
-                       self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]+".tar.bz2"
-                       self.settings["source_path"]=st+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
-               
-               self.settings["chroot_path"]=st+"/tmp/"+self.settings["target_subpath"]
-               
+               self.set_target_profile()
+               self.set_target_subpath()
+               self.set_snapshot_path()
+               self.set_target_path()
+               self.set_source_path()
+               self.set_chroot_path()
+               self.set_action_sequence()
+               self.set_use()
+               self.set_stage_path()
+
                # this next line checks to make sure that the specified variables exist on disk.
                file_locate(self.settings,["source_path","snapshot_path","distdir"],expand=0)
                
@@ -134,14 +119,11 @@ class generic_stage_target(generic_target):
                self.mounts=[ "/proc","/dev","/dev/pts","/usr/portage/distfiles" ]
                self.mountmap={"/proc":"/proc", "/dev":"/dev", "/dev/pts":"/dev/pts",\
                        "/usr/portage/distfiles":self.settings["distdir"]}
-               
-               if self.settings["target"]=="grp":
-                       self.mounts.append("/tmp/grp")
-                       self.mountmap["/tmp/grp"]=self.settings["target_path"]
+               self.set_mounts()
 
                # configure any user specified options (either in catalyst.conf or on the cmdline)
                if self.settings.has_key("PKGCACHE"):
-                       self.settings["pkgcache_path"]=st+"/packages/"+self.settings["target_subpath"]
+                       self.settings["pkgcache_path"]=self.settings["storedir"]+"/packages/"+self.settings["target_subpath"]
                        self.mounts.append("/usr/portage/packages")
                        self.mountmap["/usr/portage/packages"]=self.settings["pkgcache_path"]
 
@@ -158,7 +140,39 @@ class generic_stage_target(generic_target):
                        self.mountmap["/var/tmp/ccache"]=ccdir
                        # for the chroot:
                        os.environ["CCACHE_DIR"]="/var/tmp/ccache"      
-                       
+               
+       def set_target_profile(self):
+               self.settings["target_profile"]=self.settings["profile"]
+       
+       def set_target_subpath(self):
+               self.settings["target_subpath"]=self.settings["rel_type"]+"/"+self.settings["target"]+\
+                       "-"+self.settings["subarch"]+"-"+self.settings["version_stamp"]
+
+       def set_target_path(self):
+               self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+".tar.bz2"
+       
+       def set_source_path(self):
+               self.settings["source_path"]=self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
+       
+       def set_snapshot_path(self):
+               self.settings["snapshot_path"]=self.settings["storedir"]+"/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2"
+       
+       def set_chroot_path(self):
+               self.settings["chroot_path"]=self.settings["storedir"]+"/tmp/"+self.settings["target_subpath"]
+
+       def set_action_sequence(self):
+               #Default action sequence for run method
+               self.settings["action_sequence"]=["dir_setup","unpack_and_bind","chroot_setup",\
+                               "setup_environment","run_local","preclean","unbind","clean","capture"]
+       
+       def set_use(self):
+               pass
+
+       def set_stage_path(self):
+                       self.settings["stage_path"]=self.settings["chroot_path"]
+       def set_mounts(self):
+               pass
+       
        def mount_safety_check(self):
                mypath=self.settings["chroot_path"]
                
@@ -193,7 +207,7 @@ class generic_stage_target(generic_target):
                print "Setting up directories..."
                self.mount_safety_check()
                
-               if not self.settings["target"] == "livecd-stage2":
+               if os.path.exists(self.settings["chroot_path"]):
                        cmd("rm -rf "+self.settings["chroot_path"],\
                                "Could not remove existing directory: "+self.settings["chroot_path"])
                        
@@ -295,36 +309,22 @@ class generic_stage_target(generic_target):
                myf.write("# Please consult /etc/make.conf.example for a more detailed example\n")
                myf.write('CFLAGS="'+self.settings["CFLAGS"]+'"\n')
                myf.write('CHOST="'+self.settings["CHOST"]+'"\n')
-               
                # figure out what our USE vars are for building
                myusevars=[]
                if self.settings.has_key("HOSTUSE"):
                        myusevars.extend(self.settings["HOSTUSE"])
-                       
-               if self.settings["target"]=="grp":
-                       myusevars.append("bindist")
-                       myusevars.extend(self.settings["grp/use"])
-                       myf.write('USE="'+string.join(myusevars)+'"\n')
-                       
-               elif self.settings["target"]=="tinderbox":
-                       myusevars.extend(self.settings["tinderbox/use"])
-                       myf.write('USE="'+string.join(myusevars)+'"\n')
-                       
-               elif self.settings["target"]=="livecd-stage1":
-                       myusevars.extend(self.settings["livecd/use"])
-                       myf.write('USE="'+string.join(myusevars)+'"\n')
-                       
-               elif self.settings["target"]=="embedded":
-                       myusevars.extend(self.settings["embedded/use"])
+               
+               if self.settings.has_key("use"):
+                       myusevars.extend(self.settings["use"])
                        myf.write('USE="'+string.join(myusevars)+'"\n')
-                       
+               
                if self.settings.has_key("CXXFLAGS"):
                        myf.write('CXXFLAGS="'+self.settings["CXXFLAGS"]+'"\n')
                
                else:
                        myf.write('CXXFLAGS="${CFLAGS}"\n')
                myf.close()
-
+       
        def clean(self):
                destpath=self.settings["chroot_path"]
                
@@ -371,17 +371,8 @@ class generic_stage_target(generic_target):
                        
                print "Creating stage tarball..."
                
-               if self.settings["target"]=="stage1":
-                       cmd("tar cjf "+self.settings["target_path"]+" -C "+self.settings["chroot_path"]+\
-                               "/tmp/stage1root .","Couldn't create stage tarball")
-               
-               elif self.settings["target"]=="embedded":
-                       cmd("tar cjf "+self.settings["target_path"]+" -C "+self.settings["chroot_path"]+\
-                               "/tmp/mergeroot .","Couldn't create stage tarball")
-               
-               else:
-                       cmd("tar cjf "+self.settings["target_path"]+" -C "+self.settings["chroot_path"]+\
-                               " .","Couldn't create stage tarball")
+               cmd("tar cjf "+self.settings["target_path"]+" -C "+self.settings["stage_path"]+\
+                       " .","Couldn't create stage tarball")
 
        def run_local(self):
                try:
@@ -391,17 +382,8 @@ class generic_stage_target(generic_target):
                except CatalystError:
                        self.unbind()
                        raise CatalystError,"Stage build aborting due to error."
-
-       def run(self):
-               self.dir_setup()
-               self.unpack_and_bind()
-               try:
-                       self.chroot_setup()
-               
-               except:
-                       self.unbind()
-                       raise
-               
+       
+       def setup_environment(self):
                # modify the current environment. This is an ugly hack that should be fixed. We need this
                # to use the os.system() call since we can't specify our own environ:
                for x in self.settings.keys():
@@ -413,24 +395,16 @@ class generic_stage_target(generic_target):
                                os.environ[varname]=self.settings[x]
                        elif type(self.settings[x])==types.ListType:
                                os.environ[varname]=string.join(self.settings[x])
-                       
-               self.run_local()
-               if self.settings["target"] in ["stage1","stage2","stage3","livecd-stage1","livecd-stage2"]:
-                       self.preclean()
-               
-               if self.settings["target"] in ["livecd-stage2"]:
-                       self.unmerge()
-               
-               # unbind everything here so that we can clean()
-               self.unbind()
-               
-               if self.settings["target"] in ["stage1","stage2","stage3","livecd-stage1","livecd-stage2"]:
-                       # clean is for removing things after bind-mounts are 
-                       # unmounted (general file removal and cleanup)
-                       self.clean()
-               
-               if self.settings["target"] in ["stage1","stage2","stage3","embedded"]:
-                       self.capture()
+       
+       def run(self):
                
-               if self.settings["target"] in ["livecd-stage2"]:
-                       self.cdroot_setup()
+               for x in self.settings["action_sequence"]:
+                       print "Running action sequence: "+x
+                       if x == 'chroot_setup':
+                               try:
+                                       self.chroot_setup()
+                               except:
+                                       self.unbind()
+                                       raise
+                       else:   
+                               apply(getattr(self,x))
index aad3716e92f367708559e96af2935d959cd4d8e3..3c8619d24aa3b6969262a5b2216bc9674e321e19 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 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.3 2004/10/15 02:27:58 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/grp_target.py,v 1.4 2004/12/16 23:13:24 wolf31o2 Exp $
 
 """
 The builder class for GRP (Gentoo Reference Platform) builds.
@@ -28,7 +28,10 @@ class grp_target(generic_stage_target):
                        self.required_values.append("grp/"+x+"/type")
                        
                generic_stage_target.__init__(self,spec,addlargs)
-
+       
+       def set_target_path(self):
+           self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
+       
        def run_local(self):
                for pkgset in self.settings["grp"]:
                        # example call: "grp.sh run pkgset cd1 xmms vim sys-apps/gleep"
@@ -42,6 +45,18 @@ class grp_target(generic_stage_target):
                                self.unbind()
                                raise CatalystError,"GRP build aborting due to error."
 
+       def set_action_sequence(self):
+           self.settings["action_sequence"]=["dir_setup","unpack_and_bind","chroot_setup",\
+                                           "setup_environment","run_local","unbind"]
+       
+       def set_use(self):
+           self.settings["use"]=self.settings["grp/use"]
+           self.settings["use"].append("bindlist")
+
+       def set_mounts(self):
+           self.mounts.append("/tmp/grp")
+            self.mountmap["/tmp/grp"]=self.settings["target_path"]
+
 def register(foo):
        foo.update({"grp":grp_target})
        return foo
index aa75493c05b137280c28a3203dd48c05692b9c50..b3655e8a24f5cb348f2295fe4b503f02b32b9a01 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 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.3 2004/10/15 02:27:58 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.4 2004/12/16 23:13:24 wolf31o2 Exp $
 
 """
 Builder class for LiveCD stage1.
@@ -24,6 +24,13 @@ class livecd_stage1_target(generic_stage_target):
                except CatalystError:
                        self.unbind()
                        raise CatalystError,"LiveCD stage1 build aborting due to error."
+       def set_action_sequence(self):
+               #self.settings["action_sequence"]=["dir_setup","unpack_and_bind","chroot_setup",\
+               #                           "setup_environment","run_local","preclean","unbind","clean"]
+               self.settings["action_sequence"]=["chroot_setup"]
+
+       def set_use(self):
+                   self.settings["use"]=self.settings["livecd/use"]
 
 def register(foo):
        foo.update({"livecd-stage1":livecd_stage1_target})
index 72a77e1f99d225abb9255f728db00c20bf95edd4..fc843fed2d63eee22c1cbf3c3a1a735e3f2ef594 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 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.24 2004/12/16 17:51:23 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.25 2004/12/16 23:13:24 wolf31o2 Exp $
 
 """
 Builder class for a LiveCD stage2 build.
@@ -43,6 +43,7 @@ class livecd_stage2_target(generic_stage_target):
                        "gamecd/conf"])
                
                generic_stage_target.__init__(self,spec,addlargs)
+               self.set_cdroot_path()
                file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"])
                if self.settings.has_key("portage_confdir"):
                        file_locate(self.settings,["portage_confdir"],expand=0)
@@ -85,7 +86,31 @@ class livecd_stage2_target(generic_stage_target):
                        if retval!=0:
                                self.unbind()
                                raise CatalystError,"Couldn't bind mount "+src
-                       
+        
+       def set_target_path(self):
+           pass 
+           #self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
+               
+       def set_source_path(self):
+           self.settings["source_path"]=self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]
+       
+       def set_cdroot_path(self):
+           self.settings["cdroot_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
+
+        def dir_setup(self):
+                print "Setting up directories..."
+                self.mount_safety_check()
+
+                if not os.path.exists(self.settings["chroot_path"]+"/tmp"):
+                        os.makedirs(self.settings["chroot_path"]+"/tmp")
+
+                if not os.path.exists(self.settings["chroot_path"]):
+                        os.makedirs(self.settings["chroot_path"])
+
+                if self.settings.has_key("PKGCACHE"):
+                        if not os.path.exists(self.settings["pkgcache_path"]):
+                                os.makedirs(self.settings["pkgcache_path"])
+
        def unmerge(self):
                if self.settings.has_key("AUTORESUME") \
                        and os.path.exists(self.settings["chroot_path"]+"/tmp/.clst_unmerge"):
@@ -300,6 +325,10 @@ class livecd_stage2_target(generic_stage_target):
                if self.settings.has_key("livecd/root_overlay"):
                        cmd("rsync -a "+self.settings["livecd/root_overlay"]+"/* "+\
                                self.settings["chroot_path"], "livecd/root_overlay copy failed.")
+       def set_action_sequence(self):
+               self.settings["action_sequence"]=["dir_setup","unpack_and_bind","chroot_setup",\
+                                               "setup_environment","run_local","preclean","unmerge",\
+                                               "unbind","clean","cdroot_setup"]
 
 def register(foo):
        foo.update({"livecd-stage2":livecd_stage2_target})
index ab431d7f03847ac7dc237511b66f0c7a11d7a265..cbcb1975f3393ac6db5d0816dae8bd545be5c6ec 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/netboot.py,v 1.6 2004/10/15 02:27:58 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/netboot.py,v 1.7 2004/12/16 23:13:24 wolf31o2 Exp $
 
 """
 Builder class for a netboot build.
@@ -53,6 +53,9 @@ class netboot_target(generic_stage_target):
                        if not os.environ.has_key(envvar) and not addlargs.has_key(envvar):
                                self.settings[envvar] = "-Os -pipe"
        
+       def set_target_path(self):
+           self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
+       
        def run_local(self):
                # setup our chroot
                try:
@@ -139,6 +142,10 @@ class netboot_target(generic_stage_target):
                print "netboot: build finished !"
 
 
+       def set_action_sequence(self):
+           self.settings["action_sequence"]=["dir_setup","unpack_and_bind","chroot_setup",\
+                                               "setup_environment","run_local","unbind"]
+
 def register(foo):
        foo.update({"netboot":netboot_target})
        return foo
index 6bea0812d1f0ac7975d784c9bb3ea0c8add1b879..b20c7d35a2568cf7f4bc754577d112dddddb4192 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 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.3 2004/10/15 02:27:58 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.4 2004/12/16 23:13:24 wolf31o2 Exp $
 
 """
 Builder class for a stage1 installation tarball build.
@@ -14,6 +14,10 @@ class stage1_target(generic_stage_target):
                self.required_values=[]
                self.valid_values=[]
                generic_stage_target.__init__(self,spec,addlargs)
+       
+       def set_stage_path(self):
+               self.settings["stage_path"]=self.settings["chroot_path"]+"/tmp/stage1root"
+               print "stage1 stage path is "+self.settings["stage_path"]
 
 def register(foo):
        foo.update({"stage1":stage1_target})
index b524e3249da359f9786baaa0de6d12ad091232d1..7f8531812d8dbe79d8cee7ec5a449a032cdff192 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 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.3 2004/10/15 02:27:58 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/tinderbox_target.py,v 1.4 2004/12/16 23:13:24 wolf31o2 Exp $
 
 """
 builder class for the tinderbox target
@@ -26,7 +26,11 @@ class tinderbox_target(generic_stage_target):
                except CatalystError:
                        self.unbind()
                        raise CatalystError,"Tinderbox aborting due to error."
-
+       
+       def set_target_path(self):
+           self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
+       def set_use(self):
+                   self.settings["use"]=self.settings["tinderbox/use"]
 def register(foo):
        foo.update({"tinderbox":tinderbox_target})
        return foo