diff options
-rw-r--r-- | bin/isolated-functions.sh | 4 | ||||
-rw-r--r-- | pym/portage.py | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 0147a0b16..fc832a51f 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -405,6 +405,10 @@ save_ebuild_env() { unset COLORTERM DISPLAY EDITOR LESS LESSOPEN LOGNAME LS_COLORS PAGER \ TERM TERMCAP USER + # other variables inherited from the calling environment + unset CVS_RSH ECHANGELOG_USER GPG_AGENT_INFO \ + SSH_AGENT_PID SSH_AUTH_SOCK STY WINDOW XAUTHORITY + # 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.py b/pym/portage.py index 601c12f37..63858e5e6 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1018,6 +1018,14 @@ class config: "TERM", "TERMCAP", "USER", ] + # other variables inherited from the calling environment + _environ_whitelist += [ + "CVS_RSH", "ECHANGELOG_USER", + "GPG_AGENT_INFO", + "SSH_AGENT_PID", "SSH_AUTH_SOCK", + "STY", "WINDOW", "XAUTHORITY", + ] + _environ_whitelist = frozenset(_environ_whitelist) # Filter selected variables in the config.environ() method so that @@ -1026,10 +1034,7 @@ class config: # misc variables inherited from the calling environment _environ_filter += [ - "CVS_RSH", "ECHANGELOG_USER", - "GPG_AGENT_INFO", "INFOPATH", "MANPATH", - "SSH_AGENT_PID", "SSH_AUTH_SOCK", - "STY", "WINDOW", "XAUTHORITY", + "INFOPATH", "MANPATH", ] # portage config variables and variables set directly by portage |