summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-03 06:19:43 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-03 06:19:43 +0000
commit12ff9528ba0a3e49aa52c543f3518f722208a890 (patch)
tree9057c0812ffe233f25bdf0b69c4c9e5b98ea8043 /pym
parent71b7ee30196e74c20324802bbeb67afaab5ec4ef (diff)
downloadportage-12ff9528ba0a3e49aa52c543f3518f722208a890.tar.gz
portage-12ff9528ba0a3e49aa52c543f3518f722208a890.tar.bz2
portage-12ff9528ba0a3e49aa52c543f3518f722208a890.zip
* whitelist CCACHE_* and DISTCC_* variables in config.environ()
* unset CCACHE_* and DISTCC_* variables in save_ebuild_env() svn path=/main/trunk/; revision=8818
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index f47723141..c8634dd39 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -890,6 +890,8 @@ class config(object):
_environ_whitelist = frozenset(_environ_whitelist)
+ _environ_whitelist_re = re.compile(r'^(CCACHE_|DISTCC_).*')
+
# Filter selected variables in the config.environ() method so that
# they don't needlessly propagate down into the ebuild environment.
_environ_filter = []
@@ -2570,7 +2572,8 @@ class config(object):
(x, myvalue), noiselevel=-1)
continue
if filter_calling_env and \
- x not in environ_whitelist:
+ x not in environ_whitelist and \
+ not self._environ_whitelist_re.match(x):
if myvalue == env_d.get(x) or \
myvalue == os.environ.get(x):
continue