# 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
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",\
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"
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"])
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"]
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"]+"/")
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",\
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=[]
"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"
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"
]
])
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):
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"])
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/")):
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)
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",\
"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/*"]
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