livecd-stage1 should be working (not tested)
authorDaniel Robbins <drobbins@gentoo.org>
Tue, 16 Dec 2003 05:37:46 +0000 (05:37 +0000)
committerDaniel Robbins <drobbins@gentoo.org>
Tue, 16 Dec 2003 05:37:46 +0000 (05:37 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@103 d1e1f19c-881f-0410-ab34-b69fee027534

examples/x86-livecd-stage1-20031215.spec [new file with mode: 0644]
modules/targets.py
targets/livecd-stage1/livecd-stage1.sh [new file with mode: 0755]

diff --git a/examples/x86-livecd-stage1-20031215.spec b/examples/x86-livecd-stage1-20031215.spec
new file mode 100644 (file)
index 0000000..466c531
--- /dev/null
@@ -0,0 +1,10 @@
+subarch: x86
+version_stamp: 20031215
+target: livecd-stage1
+rel_type: default
+rel_version: 1.4
+snapshot: 20031215
+source_subpath: default-x86-1.4/stage3-x86-20031215
+livecd-stage1/packages:
+       irssi
+       aumix
index a781640cc8c8433efebd96c857b77c5b67c0d59f..e84275f80ea9d444880fa5a5f7fab72ed5793f0e 100644 (file)
@@ -184,6 +184,8 @@ class generic_stage_target(generic_target):
                        myusevars.extend(self.settings["grp/use"])
                elif self.settings["target"]=="tinderbox":
                        myusevars.extend(self.settings["tinderbox/use"])
+               elif self.settings["target"]=="livecd-stage1":
+                       myusevars.extend(self.settings["livecd-stage1/use"])
                myf.write('USE="'+string.join(myusevars)+'"\n')
                if self.settings.has_key("CXXFLAGS"):
                        myf.write('CXXFLAGS="'+self.settings["CXXFLAGS"]+'"\n')
@@ -255,6 +257,12 @@ class generic_stage_target(generic_target):
                                except CatalystError:
                                        self.unbind()
                                        raise CatalystError,"GRP build aborting due to error."
+               elif self.settings["target"]=="livecd-stage1":
+                       try:
+                               cmd(self.settings["sharedir"]+"/targets/livecd-stage1/livecd-stage1.sh run "+string.join(self.settings["livecd-stage1/packages"]))
+                       except CatalystError:
+                               self.unbind()
+                               raise CatalystError,"GRP build aborting due to error."
                else:
                        #tinderbox
                        #example call: "grp.sh run xmms vim sys-apps/gleep"
@@ -340,12 +348,12 @@ class tinderbox_target(generic_stage_target):
                generic_stage_target.__init__(self,spec,addlargs)
                self.valid_values=self.required_values
 
-class livecd_target(generic_stage_target):
+class livecd_stage1_target(generic_stage_target):
        def __init__(self,spec,addlargs):
                generic_target.__init__(self,spec,addlargs)
 
 def register(foo):
        foo.update({"stage1":stage1_target,"stage2":stage2_target,"stage3":stage3_target,
-       "grp":grp_target,"livecd":livecd_target,"snapshot":snapshot_target,"tinderbox":tinderbox_target})
+       "grp":grp_target,"livecd-stage1":livecd_stage1_target,"snapshot":snapshot_target,"tinderbox":tinderbox_target})
        return foo
        
diff --git a/targets/livecd-stage1/livecd-stage1.sh b/targets/livecd-stage1/livecd-stage1.sh
new file mode 100755 (executable)
index 0000000..5df42cb
--- /dev/null
@@ -0,0 +1,36 @@
+# 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 $
+
+case $1 in
+enter)
+       $clst_CHROOT $clst_chroot_path
+       ;;
+run)
+       export clst_packages="$*"
+       $clst_CHROOT $clst_chroot_path /bin/bash << EOF
+       env-update
+       source /etc/profile
+       if [ -n "${clst_CCACHE}" ]
+       then
+               export FEATURES="ccache"
+               emerge --oneshot --nodeps ccache || exit 1
+       fi
+       export CONFIG_PROTECT="-*"
+       USE="build" emerge portage
+       #turn off auto-use:
+       export USE_ORDER="env:conf:defaults"    
+       if [ -n "${clst_PKGCACHE}" ]
+       then
+               emerge --usepkg --buildpkg --noreplace $clst_packages || exit 1
+       else
+               emerge --noreplace $clst_packages || exit 1
+       fi
+EOF
+       [ $? -ne 0 ] && exit 1
+       ;;
+*)
+       exit 1
+       ;;
+esac
+exit 0