From 53b2f6a9fb8138734b9582c098ba928e295b6108 Mon Sep 17 00:00:00 2001 From: Daniel Robbins Date: Tue, 16 Dec 2003 05:37:46 +0000 Subject: [PATCH] livecd-stage1 should be working (not tested) git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@103 d1e1f19c-881f-0410-ab34-b69fee027534 --- examples/x86-livecd-stage1-20031215.spec | 10 +++++++ modules/targets.py | 12 ++++++-- targets/livecd-stage1/livecd-stage1.sh | 36 ++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 examples/x86-livecd-stage1-20031215.spec create mode 100755 targets/livecd-stage1/livecd-stage1.sh diff --git a/examples/x86-livecd-stage1-20031215.spec b/examples/x86-livecd-stage1-20031215.spec new file mode 100644 index 00000000..466c5314 --- /dev/null +++ b/examples/x86-livecd-stage1-20031215.spec @@ -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 diff --git a/modules/targets.py b/modules/targets.py index a781640c..e84275f8 100644 --- a/modules/targets.py +++ b/modules/targets.py @@ -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 index 00000000..5df42cbb --- /dev/null +++ b/targets/livecd-stage1/livecd-stage1.sh @@ -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 -- 2.26.2