From b5e4984613eaedce63a30d41538acb40e915690b Mon Sep 17 00:00:00 2001 From: Daniel Robbins Date: Tue, 23 Dec 2003 06:36:52 +0000 Subject: [PATCH] various little fixes git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@109 d1e1f19c-881f-0410-ab34-b69fee027534 --- modules/targets.py | 17 +++++++++++------ targets/livecd-stage1/livecd-stage1.sh | 3 ++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/modules/targets.py b/modules/targets.py index e367e547..a4f43e2e 100644 --- a/modules/targets.py +++ b/modules/targets.py @@ -15,8 +15,8 @@ class generic_stage_target(generic_target): def __init__(self,myspec,addlargs): - self.required_values=["version_stamp","target","subarch","rel_type","rel_version","snapshot","source_subpath"] - self.valid_values=self.required_values + self.required_values.extend(["version_stamp","target","subarch","rel_type","rel_version","snapshot","source_subpath"]) + self.valid_values.extend(self.required_values[:]) generic_target.__init__(self,addlargs,myspec) # map the mainarch we are running under to the mainarches we support for # building stages and LiveCDs. (for example, on amd64, we can build stages for @@ -245,7 +245,7 @@ class generic_stage_target(generic_target): elif type(self.settings[x])==types.ListType: os.environ["clst_"+x]=string.join(self.settings[x]) - if self.settings["target"] not in ["grp","tinderbox"]: + if self.settings["target"] in ["stage1","stage2","stage3"]: try: cmd(self.settings["sharedir"]+"/targets/"+self.settings["target"]+"/"+self.settings["target"]+".sh run","build script failed") except CatalystError: @@ -282,7 +282,7 @@ class generic_stage_target(generic_target): except CatalystError: self.unbind() raise CatalystError,"GRP build aborting due to error." - else: + elif self.settings["target"]=="tinderbox": #tinderbox #example call: "grp.sh run xmms vim sys-apps/gleep" try: @@ -290,6 +290,8 @@ class generic_stage_target(generic_target): except CatalystError: self.unbind() raise CatalystError,"Tinderbox aborting due to error." + else: + raise CatalystError,"You shouldn't get to this point. Target not recognized." if self.settings["target"] not in ["grp","tinderbox"]: self.preclean() self.unbind() @@ -369,11 +371,14 @@ class tinderbox_target(generic_stage_target): class livecd_stage1_target(generic_stage_target): def __init__(self,spec,addlargs): - generic_target.__init__(self,spec,addlargs) + self.required_values=["livecd-stage1/packages"] + self.valid_values=["livecd-stage1/use","livecd-stage1/packages"] + generic_stage_target.__init__(self,spec,addlargs) class livecd_stage2_target(generic_stage_target): def __init__(self,spec,addlargs): - generic_target.__init__(self,spec,addlargs) + self.required_values=["boot"] + generic_stage_target.__init__(self,spec,addlargs) def register(foo): foo.update({"stage1":stage1_target,"stage2":stage2_target,"stage3":stage3_target, diff --git a/targets/livecd-stage1/livecd-stage1.sh b/targets/livecd-stage1/livecd-stage1.sh index 5df42cbb..ca7f46ba 100755 --- a/targets/livecd-stage1/livecd-stage1.sh +++ b/targets/livecd-stage1/livecd-stage1.sh @@ -1,12 +1,13 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/Attic/livecd-stage1.sh,v 1.1 2003/12/16 05:37:46 drobbins Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/Attic/livecd-stage1.sh,v 1.2 2003/12/23 06:36:52 drobbins Exp $ case $1 in enter) $clst_CHROOT $clst_chroot_path ;; run) + shift export clst_packages="$*" $clst_CHROOT $clst_chroot_path /bin/bash << EOF env-update -- 2.26.2