From 12ff9528ba0a3e49aa52c543f3518f722208a890 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 3 Dec 2007 06:19:43 +0000 Subject: [PATCH] * whitelist CCACHE_* and DISTCC_* variables in config.environ() * unset CCACHE_* and DISTCC_* variables in save_ebuild_env() svn path=/main/trunk/; revision=8818 --- bin/isolated-functions.sh | 3 +++ pym/portage/__init__.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index f6ca22654..dfe4cfba7 100755 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -409,6 +409,9 @@ save_ebuild_env() { unset ECHANGELOG_USER GPG_AGENT_INFO \ SSH_AGENT_PID SSH_AUTH_SOCK STY WINDOW XAUTHORITY + # CCACHE and DISTCC config + unset ${!CCACHE_*} ${!DISTCC_*} + # There's no need to bloat environment.bz2 with internally defined # functions and variables, so filter them out if possible. 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 -- 2.26.2