Remove all references to 'spec' and 'addlargs' in target modules
authorAndrew Gaffney <agaffney@gentoo.org>
Tue, 13 Jan 2009 18:40:59 +0000 (12:40 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Tue, 13 Jan 2009 18:40:59 +0000 (12:40 -0600)
13 files changed:
ChangeLog
modules/catalyst/target/embedded.py
modules/catalyst/target/generic.py
modules/catalyst/target/generic_stage.py
modules/catalyst/target/grp.py
modules/catalyst/target/livecd_stage1.py
modules/catalyst/target/livecd_stage2.py
modules/catalyst/target/netboot.py
modules/catalyst/target/stage1.py
modules/catalyst/target/stage2.py
modules/catalyst/target/stage3.py
modules/catalyst/target/stage4.py
modules/catalyst/target/tinderbox.py

index 28551612ca6a38a1ae958e5b75a9e1d2471738b6..82d04e63ca566ccae87de9ad9062d9976808c2fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,16 @@
 # Copyright 2002-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS)
 # Distributed under the GPL v2
 
+  13 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
+  modules/catalyst/target/embedded.py, modules/catalyst/target/generic.py,
+  modules/catalyst/target/generic_stage.py, modules/catalyst/target/grp.py,
+  modules/catalyst/target/livecd_stage1.py,
+  modules/catalyst/target/livecd_stage2.py,
+  modules/catalyst/target/netboot.py, modules/catalyst/target/stage1.py,
+  modules/catalyst/target/stage2.py, modules/catalyst/target/stage3.py,
+  modules/catalyst/target/stage4.py, modules/catalyst/target/tinderbox.py:
+  Remove all references to 'spec' and 'addlargs' in target modules
+
   13 Jan 2009; Andrew Gaffney <agaffney@gentoo.org>
   modules/catalyst/config.py:
   All targets have been updated not to use the spec_prefix, so we don't need
index 9afdc4065ed27eb2a50a48a41e3c83a1e970150a..ae4ec18b805ef6f9d2885c04d1c721d0f91adbb0 100644 (file)
@@ -15,11 +15,11 @@ from catalyst.output import *
 
 class embedded_target(generic_stage_target):
 
-       def __init__(self,spec,addlargs):
+       def __init__(self):
                self.valid_values = ["empty","rm","unmerge","fs-prepare","fs-finish","mergeroot","packages","fs-type"]
                self.valid_values += ["runscript","boot/kernel","linuxrc", "use", "fs-ops"]
 
-               generic_stage_target.__init__(self,spec,addlargs)
+               generic_stage_target.__init__()
 
        def set_action_sequence(self):
                self.settings["action_sequence"]=["dir_setup","unpack","unpack_snapshot",\
index a97f13ae7bd819de735b37bc8d4610d25abdb0b7..944043cd8e812fb68902fcd41f968793715d0aed 100644 (file)
@@ -8,14 +8,14 @@ from catalyst.output import *
 
 class generic_target:
 
-       def __init__(self, myspec=None, addlargs=None):
-               if myspec and addlargs:
-                       catalyst.util.addl_arg_parse(myspec,addlargs,self.required_values,self.valid_values)
-                       self.settings=myspec
-               else:
-                       self.config = catalyst.config.config()
-                       self.settings = self.config.get_spec().get_values()
-                       self.settings.update(self.config.get_conf())
+       def __init__(self):
+#              if myspec and addlargs:
+#                      catalyst.util.addl_arg_parse(myspec,addlargs,self.required_values,self.valid_values)
+#                      self.settings=myspec
+#              else:
+               self.config = catalyst.config.config()
+               self.settings = self.config.get_spec().get_values()
+               self.settings.update(self.config.get_conf())
 
                self.env={}
                self.env["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
index b311bceacc042969ea48cd413383efd46bddc4bf..45fa1f90cf6298e65daec0528e1bf31f9f0b4931 100644 (file)
@@ -14,8 +14,8 @@ from catalyst.target.generic import *
 
 class generic_stage_target(generic_target):
 
-       def __init__(self, myspec=None, addlargs=None):
-               generic_target.__init__(self,myspec,addlargs)
+       def __init__(self):
+               generic_target.__init__(self)
 
                self.required_values.extend(["version_stamp","target","subarch",\
                        "rel_type","profile","snapshot","source_subpath"])
index 931db9f8bab341b20081907e1e2b5e99825ab796..f29437ea2f0a8aee420e3d421bc8c3d84d928217 100644 (file)
@@ -11,7 +11,7 @@ from catalyst.spawn import cmd
 from catalyst.output import *
 
 class grp_target(generic_stage_target):
-       def __init__(self,spec,addlargs):
+       def __init__(self):
                self.required_values=["version_stamp","target","subarch",\
                        "rel_type","profile","snapshot","source_subpath"]
 
@@ -32,7 +32,7 @@ class grp_target(generic_stage_target):
                        self.required_values.append("grp/"+x+"/packages")
                        self.required_values.append("grp/"+x+"/type")
 
-               generic_stage_target.__init__(self,spec,addlargs)
+               generic_stage_target.__init__(self)
 
        def set_target_path(self):
                self.settings["target_path"]=catalyst.util.normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+"/")
index a66fc2087b53ac7a49f7910efa420d3d7df7c199..39667f6a9ac48709a1278f64ae741125886cdddc 100644 (file)
@@ -9,12 +9,12 @@ from catalyst.spawn import cmd
 from catalyst.output import *
 
 class livecd_stage1_target(generic_stage_target):
-       def __init__(self,spec,addlargs):
+       def __init__(self):
                self.required_values=["livecd/packages"]
                self.valid_values=self.required_values[:]
 
                self.valid_values.extend(["livecd/use"])
-               generic_stage_target.__init__(self,spec,addlargs)
+               generic_stage_target.__init__(self)
 
        def set_action_sequence(self):
                self.settings["action_sequence"]=["unpack","unpack_snapshot",\
index 35675db1df63aaec687ecd53732cc7cdc649e3e4..c566c48021dad45d8596af80c88507c44a5148c0 100644 (file)
@@ -11,7 +11,7 @@ from catalyst.spawn import cmd
 from catalyst.output import *
 
 class livecd_stage2_target(generic_stage_target):
-       def __init__(self,spec,addlargs):
+       def __init__(self):
                self.required_values=["boot/kernel"]
 
                self.valid_values=[]
@@ -26,7 +26,7 @@ class livecd_stage2_target(generic_stage_target):
                        "livecd/fstype","livecd/fsops","livecd/linuxrc","livecd/bootargs",\
                        "gamecd/conf","livecd/xdm","livecd/xsession","livecd/volid"])
 
-               generic_stage_target.__init__(self,spec,addlargs)
+               generic_stage_target.__init__(self)
                if not "livecd/type" in self.settings:
                        self.settings["livecd/type"] = "generic-livecd"
 
index 55156edd838ef16d45fa024b3c1cd794a964b353..313b958debea0b2392e4458cdec114166876b647 100644 (file)
@@ -11,7 +11,9 @@ from catalyst.spawn import cmd
 from catalyst.output import *
 
 class netboot_target(generic_stage_target):
-       def __init__(self,spec,addlargs):
+       def __init__(self):
+               generic_stage_target.__init__(self)
+
                self.required_values=[
                        "boot/kernel"
                ]
@@ -27,18 +29,17 @@ class netboot_target(generic_stage_target):
                ])
 
                try:
-                       if "netboot/packages" in addlargs:
+                       if "netboot/packages" in self.settings:
                                if type(addlargs["netboot/packages"]) == types.StringType:
-                                       loopy=[addlargs["netboot/packages"]]
+                                       loopy=[self.settings["netboot/packages"]]
                                else:
-                                       loopy=addlargs["netboot/packages"]
+                                       loopy=self.settings["netboot/packages"]
 
                                for x in loopy:
                                        self.valid_values.append("netboot/packages/"+x+"/files")
                except:
                        raise CatalystError,"configuration error in netboot/packages."
 
-               generic_stage_target.__init__(self,spec,addlargs)
                self.settings["merge_path"]=catalyst.util.normpath("/tmp/image/")
 
        def set_target_path(self):
index c0b9fb0b84aaed7042fdce5a0f67c4cb06d85d46..82403920b4413278a923668453ac17436b690016 100644 (file)
@@ -8,10 +8,12 @@ import catalyst
 from catalyst.output import *
 
 class stage1_target(generic_stage_target):
-       def __init__(self,spec,addlargs):
+
+       def __init__(self):
+               generic_stage_target.__init__(self)
+
                self.required_values=[]
                self.valid_values=["chost"]
-               generic_stage_target.__init__(self,spec,addlargs)
 
        def set_stage_path(self):
                self.settings["stage_path"]=catalyst.util.normpath(self.settings["chroot_path"]+self.settings["root_path"])
index 68e8c8df58422c038d7ef186fcd0b2f2e936a62f..8ecad3cef9384d63ca9e08c5f6bd13e67569486f 100644 (file)
@@ -8,10 +8,12 @@ import catalyst
 from catalyst.output import *
 
 class stage2_target(generic_stage_target):
-       def __init__(self,spec,addlargs):
+
+       def __init__(self):
+               generic_stage_target.__init__(self)
+
                self.required_values=[]
                self.valid_values=["chost"]
-               generic_stage_target.__init__(self,spec,addlargs)
 
        def set_source_path(self):
                if "SEEDCACHE" in self.settings and os.path.isdir(catalyst.util.normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/")):
index 6ae7e1002351beb55a77e94f1bc71928d1bd5538..5367a2ac459a7230451aba4acbfd37e4fdcc0e7f 100644 (file)
@@ -6,10 +6,12 @@ Builder class for a stage3 installation tarball build.
 from generic_stage import *
 
 class stage3_target(generic_stage_target):
-       def __init__(self,spec,addlargs):
+
+       def __init__(self):
+               generic_stage_target.__init__(self)
+
                self.required_values=[]
                self.valid_values=[]
-               generic_stage_target.__init__(self,spec,addlargs)
 
        def set_portage_overlay(self):
                generic_stage_target.set_portage_overlay(self)
index 33f989b603af03edb44d49347ec28fbb3f68c533..074a920e933e1a0f86574ad27c0b8a9d2d02c62e 100644 (file)
@@ -6,7 +6,10 @@ Builder class for stage4.
 from generic_stage import *
 
 class stage4_target(generic_stage_target):
-       def __init__(self,spec,addlargs):
+
+       def __init__(self):
+               generic_stage_target.__init__(self)
+
                self.required_values=["stage4/packages"]
                self.valid_values=self.required_values[:]
                self.valid_values.extend(["stage4/use","boot/kernel",\
@@ -14,7 +17,6 @@ class stage4_target(generic_stage_target):
                                "stage4/gk_mainargs","splash_theme",\
                                "portage_overlay","stage4/rcadd","stage4/rcdel",\
                                "stage4/linuxrc","stage4/unmerge","stage4/rm","stage4/empty"])
-               generic_stage_target.__init__(self,spec,addlargs)
 
        def set_cleanables(self):
                self.settings["cleanables"]=["/var/tmp/*","/tmp/*"]
index 00f58505a89b5461558491488194b823f77c992c..a1cbd787778902d1f46e2b1bbcc0b0a9f8a59a58 100644 (file)
@@ -9,11 +9,13 @@ from catalyst.error import *
 from catalyst.spawn import cmd
 
 class tinderbox_target(generic_stage_target):
-       def __init__(self,spec,addlargs):
+
+       def __init__(self):
+               generic_stage_target.__init__(self)
+
                self.required_values=["tinderbox/packages"]
                self.valid_values=self.required_values[:]
                self.valid_values.extend(["tinderbox/use"])
-               generic_stage_target.__init__(self,spec,addlargs)
 
        def run_local(self):
                # tinderbox