From cb1bd5ebecc9420185ddffa3a22eb34f94746210 Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Tue, 13 Jan 2009 08:05:44 -0600 Subject: [PATCH] Don't pass conf_values or addlargs to target __init__() --- ChangeLog | 5 +++++ catalyst | 3 ++- modules/catalyst/target/generic_stage.py | 3 ++- modules/catalyst/target/snapshot.py | 7 ++++--- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16704594..caf3af02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ # Copyright 2002-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS) # Distributed under the GPL v2 + 13 Jan 2009; Andrew Gaffney catalyst, + modules/catalyst/target/generic_stage.py, + modules/catalyst/target/snapshot.py: + Don't pass conf_values or addlargs to target __init__() + 13 Jan 2009; Andrew Gaffney modules/catalyst/target/embedded.py, modules/catalyst/target/generic.py, modules/catalyst/target/generic_stage.py, diff --git a/catalyst b/catalyst index 50a7af7f..a959e91a 100755 --- a/catalyst +++ b/catalyst @@ -147,7 +147,8 @@ def build_target(addlargs, targetmap): raise CatalystError,"Target \""+addlargs["target"]+"\" not available." config.get_spec().set_target(addlargs["target"]) - mytarget=targetmap[addlargs["target"]](conf_values, addlargs) +# mytarget=targetmap[addlargs["target"]](conf_values, addlargs) + mytarget=targetmap[addlargs["target"]]() mytarget.run() diff --git a/modules/catalyst/target/generic_stage.py b/modules/catalyst/target/generic_stage.py index dc7da534..b311bcea 100644 --- a/modules/catalyst/target/generic_stage.py +++ b/modules/catalyst/target/generic_stage.py @@ -15,6 +15,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) + self.required_values.extend(["version_stamp","target","subarch",\ "rel_type","profile","snapshot","source_subpath"]) @@ -24,7 +26,6 @@ class generic_stage_target(generic_target): "distcc_hosts","makeopts","pkgcache_path","kerncache_path"]) self.set_valid_build_kernel_vars(addlargs) - generic_target.__init__(self,myspec,addlargs) """ The semantics of subarchmap and machinemap changed a bit in 2.0.3 to diff --git a/modules/catalyst/target/snapshot.py b/modules/catalyst/target/snapshot.py index b9ff0c85..5df1610d 100644 --- a/modules/catalyst/target/snapshot.py +++ b/modules/catalyst/target/snapshot.py @@ -5,17 +5,18 @@ Builder class for snapshots. import os, shutil, stat import catalyst +from catalyst.target.generic import generic_target from catalyst.spawn import cmd from catalyst.output import * class snapshot_target(catalyst.target.generic.generic_target): - def __init__(self,myspec,addlargs): + def __init__(self): + generic_target.__init__(self) + self.required_values = ["version_stamp","target"] self.valid_values = ["version_stamp","target"] - catalyst.target.generic.generic_target.__init__(self) - def setup(self): self.settings["target_subpath"]="portage" st=self.settings["storedir"] -- 2.26.2