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.
_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 = []
(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