targetmap={}
targets.register(targetmap)
-if "ccache" in string.split(myspec["options"]):
- myspec["CCACHE"]="1"
+myspec["CCACHE"]="1"
print "Compiler cache support enabled."
if "pkgcache" in string.split(myspec["options"]):
print "Package cache support enabled."
ccdir=os.environ["CCACHE_DIR"]
del os.environ["CCACHE_DIR"]
else:
- ccdir="/var/tmp/portage/ccache"
+ ccdir="/root/.ccache"
if not os.path.isdir(ccdir):
raise CatalystError,"Compiler cache support can't be enabled (can't find "+ccdir+")"
- self.mounts.append("/var/tmp/portage/ccache")
- self.mountmap["/var/tmp/portage/ccache"]=ccdir
-
+ self.mounts.append("/var/tmp/ccache")
+ self.mountmap["/var/tmp/ccache"]=ccdir
+ #for the chroot:
+ os.environ["CCACHE_DIR"]="/var/tmp/ccache"
+
if self.settings["target"]=="grp":
self.mounts.append("/tmp/grp")
self.mountmap["/tmp/grp"]=self.settings["target_path"]
destpath=self.settings["chroot_path"]
cleanables=["/etc/resolv.conf","/var/tmp/*","/tmp/*","/root/*"]
- if self.settings.has_key("CCACHE"):
- cleanables.append("/var/cache/ccache/*")
if self.settings["target"] not in ["livecd-stage2"]:
#we don't need to clean up a livecd-stage2
cleanables.append("/usr/portage")
# 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.5 2004/01/29 21:53:22 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/Attic/grp.sh,v 1.6 2004/02/10 00:14:33 drobbins Exp $
case $1 in
enter)
export PKGDIR="/tmp/grp/$clst_grp_target"
emerge --usepkg --buildpkg --noreplace $clst_grp_packages || exit 1
else
+ unset DISTDIR
+ #first grab to the normal distdir
+ emerge --fetchonly $clst_grp_packages || exit 1
export DISTDIR="/tmp/grp/$clst_grp_target"
- unset PKGDIR
+ export OLD_MIRRORS="\$GENTOO_MIRRORS\"
+ export GENTOO_MIRRORS="/usr/portage/distfiles"
+ #now grab them again, but with /usr/portage/distfiles as the primary mirror (local grab)
emerge --fetchonly $clst_grp_packages || exit 1
+ #restore original GENTOO_MIRRORS setting, if any
+ export GENTOO_MIRRORS="\$OLD_MIRRORS"
+ unset PKGDIR
fi
EOF
[ $? -ne 0 ] && exit 1