summaryrefslogtreecommitdiffstats
path: root/py
diff options
context:
space:
mode:
authorMichael E Brown <michael_e_brown@dell.com>2008-01-22 12:31:50 -0600
committerMichael E Brown <michael_e_brown@dell.com>2008-01-22 12:31:50 -0600
commit041b8dac4983ae69dd5f0edbc9522dce662fb798 (patch)
tree530667f4f44eaf7a1067d8e003baf31698c77b18 /py
parent5962b8ac964d56a15586e6c9e069670a5a896b6a (diff)
downloadmock-041b8dac4983ae69dd5f0edbc9522dce662fb798.tar.gz
mock-041b8dac4983ae69dd5f0edbc9522dce662fb798.tar.xz
mock-041b8dac4983ae69dd5f0edbc9522dce662fb798.zip
we now run /etc/profile, so no need to manually do ccache stuff.
Diffstat (limited to 'py')
-rw-r--r--py/mock/plugins/ccache.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/py/mock/plugins/ccache.py b/py/mock/plugins/ccache.py
index 77a9130..b5f3c35 100644
--- a/py/mock/plugins/ccache.py
+++ b/py/mock/plugins/ccache.py
@@ -48,23 +48,8 @@ class CCache(object):
# cache.
decorate(traceLog())
def _ccachePreInitHook(self):
+ getLog().info("enabled ccache")
mock.util.mkdirIfAbsent(self.rootObj.makeChrootPath('/tmp/ccache'))
mock.util.mkdirIfAbsent(self.ccachePath)
- os.environ['PATH'] = "/tmp/ccache:%s" % (os.environ['PATH'])
os.environ['CCACHE_DIR'] = "/tmp/ccache"
os.environ['CCACHE_UMASK'] = "002"
- for i in ("cc", "gcc", "gcc296", "gcc32", "gcc33", "gcc34",
- "g++", "c++", "c++32", "c++33", "c++34", "g++296", "g++32", "g++33", "g++34",
- "g++-libstdc++-so_7",):
- forceLink("/usr/bin/ccache", os.path.join(self.ccachePath, "%s" % i))
- forceLink("/usr/bin/ccache", os.path.join(self.ccachePath, "x86_64-redhat-linux-%s" % i))
- forceLink("/usr/bin/ccache", os.path.join(self.ccachePath, "i386-redhat-linux-%s" % i))
-
-decorate(traceLog())
-def forceLink( existing, linkname ):
- try:
- os.unlink(linkname)
- except OSError:
- pass
-
- os.symlink(existing, linkname)