various little fixes
authorDaniel Robbins <drobbins@gentoo.org>
Tue, 23 Dec 2003 06:36:52 +0000 (06:36 +0000)
committerDaniel Robbins <drobbins@gentoo.org>
Tue, 23 Dec 2003 06:36:52 +0000 (06:36 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@109 d1e1f19c-881f-0410-ab34-b69fee027534

modules/targets.py
targets/livecd-stage1/livecd-stage1.sh

index e367e547e06743d8828793c4be37750350c25b17..a4f43e2efc1e9be5f4a863857bb5d0cd38209f6a 100644 (file)
@@ -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,
index 5df42cbb0cfc4c9c339783c0af4d43d62a75e27f..ca7f46ba3bea63481bd18cd9e8570baed530f890 100755 (executable)
@@ -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