* whitelist some misc variables from the calling environment
authorZac Medico <zmedico@gentoo.org>
Sat, 1 Dec 2007 22:26:29 +0000 (22:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 1 Dec 2007 22:26:29 +0000 (22:26 -0000)
* blacklist the same variables in save_ebuild_env() so that
  the latest values from the calling environment always
  override those from the ebuild environment

svn path=/main/trunk/; revision=8796

bin/isolated-functions.sh
pym/portage/__init__.py

index 0147a0b16fd7556e0af16528a59f1b02867824de..fc832a51f0d56f79c6978cde5de2ca11d661425a 100755 (executable)
@@ -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.
 
index ba978bb282baec47686cf35e159eff9f3e67b4d4..222130929dd8b5b0c4ed46dd9f778fb907b3f14c 100644 (file)
@@ -880,6 +880,14 @@ class config(object):
                "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
@@ -888,10 +896,7 @@ class config(object):
 
        # 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