generic_stage_target.__init__(self,spec,addlargs)
def run_local(self):
- mypack=self.settings["livecd/packages"][:]
- for x in range(0,len(mypack)):
- #surround args with quotes for passing to bash, allows things like "<" to remain intact
- mypack[x]="'"+mypack[x]+"'"
- mypack=string.join(mypack)
+ mypack=string.join(self.settings["livecd/packages"])
+ #escape ">" and "<" for the shell (using backslash)
+ mypack=string.replace(mypack,">","\\>")
+ mypack=string.replace(mypack,"<","\\<")
try:
cmd("/bin/bash "+self.settings["sharedir"]+"/targets/livecd-stage1/livecd-stage1.sh run "+mypack)
except CatalystError:
# 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.4 2004/01/12 06:35:05 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/Attic/livecd-stage1.sh,v 1.5 2004/01/12 06:46:55 drobbins Exp $
case $1 in
enter)
USE="build" emerge portage
#turn off auto-use:
export USE_ORDER="env:conf:defaults"
- for x in "$@"
- do
- if [ -n "${clst_PKGCACHE}" ]
- then
- emerge --usepkg --buildpkg --noreplace "\$x" || exit 1
- else
- emerge --noreplace "\$x" || exit 1
- fi
- done
+ if [ -n "${clst_PKGCACHE}" ]
+ then
+ emerge --usepkg --buildpkg --noreplace $* || exit 1
+ else
+ emerge --noreplace $* || exit 1
+ fi
EOF
[ $? -ne 0 ] && exit 1
;;