# ChangeLog for gentoo/src/catalyst
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.10 2003/11/08 23:53:15 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.11 2003/11/09 01:51:30 drobbins Exp $
+ 08 Nov 2003; Daniel Robbins <drobbins@gentoo.org>: spec file support integrated
+ into catalyst. Use "-f/--file specfile" as argument; see examples dir for examples.
+
08 Nov 2003; Daniel Robbins <drobbins@gentoo.org>: support functions for spec
file parsing and reading added. Will get added to the code soon.
sys.exit(1)
if os.getuid()!=0:
#non-root callers can't go any further than here.
- die("This script requires root privileges to operate.")
+ print "catalyst: This script requires root privileges to operate."
+ sys.exit(1)
myspec={}
myconf={}
if "pkgcache" in string.split(myspec["options"]):
print "Package cache support enabled."
myspec["PKGCACHE"]="1"
-#determine target, call target constructor and hand it the rest of the arguments
-try:
+if sys.argv[1] in ["-f", "--file" ]:
+ try:
+ addlargs=read_spec(sys.argv[2])
+ except:
+ raise CatalystError,"Unable to read spec file",sys.argv[2]
+ unparsedargs=sys.argv[3:]
+else:
addlargs={}
- arg_parse(myspec,addlargs)
+ unparsedargs=sys.argv[1:]
+try:
+ arg_parse(myspec,addlargs,unparsedargs)
if not targetmap.has_key(myspec["target"]):
raise CatalystError,"Target \""+myspec["target"]+"\" not available."
mytarget=targetmap[myspec["target"]](myspec,addlargs)
if self.settings["target"]=="grp":
#grp creates a directory of packages and sources rather than a compressed tarball
self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]
+ #since we have a directory here, we need to create it
+ if not os.path.exists(self.settings["target_path"]):
+ os.makedirs(self.settings["target_path"])
else:
self.settings["target_path"]=st+"/builds/"+self.settings["target_subpath"]+".tar.bz2"
'CFLAGS="'+self.settings["CFLAGS"]+'"',
'CHOST="'+self.settings["CHOST"]+'"']
myusevars=[]
- if self.setttings.has_key("HOSTUSE"):
+ if self.settings.has_key("HOSTUSE"):
myusevars.extend(self.settings["HOSTUSE"])
if self.settings["target"]=="grp":
myusevars.append("bindist")
--- /dev/null
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/Attic/grp.sh,v 1.1 2003/11/09 01:51:30 drobbins Exp $
+
+case $1 in
+enter)
+ $clst_CHROOT $clst_chroot_path
+ ;;
+run)
+ shift
+ export clst_grp_type=$1
+ shift
+ export clst_grp_target=$1
+ shift
+ export clst_grp_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
+ if [ ${clst_rel_type} = "hardened" ]
+ then
+ emerge --oneshot --nodeps hardened-gcc || exit 1
+ fi
+ export CONFIG_PROTECT="-*"
+
+ USE="build" emerge portage
+
+ if [ "$clst_grp_type" = "pkgset" ]
+ then
+ unset DISTDIR
+ export PKGDIR="/tmp/grp/$clst_grp_target"
+ emerge --usepkg --buildpkg --noreplace $clst_grp_packages || exit 1
+ else
+ export DISTDIR="/tmp/grp/$clst_grp_target"
+ unset PKGDIR
+ emerge --fetchonly $clst_grp_packages || exit 1
+ fi
+EOF
+ [ $? -ne 0 ] && exit 1
+ ;;
+*)
+ exit 1
+ ;;
+esac
+exit 0