From: Daniel Robbins Date: Tue, 10 Feb 2004 00:14:33 +0000 (+0000) Subject: grp srcset enhancement, ccache should now work X-Git-Tag: CATALYST_1_0_1~32 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=9952e3ab4ea295dd27d825eb16859ebc1aca44bf;p=catalyst.git grp srcset enhancement, ccache should now work git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@208 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/catalyst b/catalyst index de65cabf..cd4f1065 100755 --- a/catalyst +++ b/catalyst @@ -59,8 +59,7 @@ except ImportError: 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." diff --git a/modules/targets.py b/modules/targets.py index c99f9e8d..1ae3a8fe 100644 --- a/modules/targets.py +++ b/modules/targets.py @@ -108,12 +108,14 @@ class generic_stage_target(generic_target): 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"] @@ -221,8 +223,6 @@ class generic_stage_target(generic_target): 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") diff --git a/targets/grp/grp.sh b/targets/grp/grp.sh index d1342825..9b1f4da9 100755 --- a/targets/grp/grp.sh +++ b/targets/grp/grp.sh @@ -1,6 +1,6 @@ # 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) @@ -45,9 +45,17 @@ run) 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