Filter more misc environment variables.
authorZac Medico <zmedico@gentoo.org>
Mon, 26 Nov 2007 04:05:43 +0000 (04:05 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 26 Nov 2007 04:05:43 +0000 (04:05 -0000)
svn path=/main/trunk/; revision=8676

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

index 30d57526604d8c43d9a93e91ad8933ce9eb90e22..446df8309a33aa227f2951ae89fc2fb7026b7505 100755 (executable)
@@ -386,8 +386,8 @@ save_ebuild_env() {
        (
 
                # misc variables set by bash
-               unset BASH HOSTTYPE IFS MACHTYPE OLDPWD \
-                       OPTERR OPTIND OSTYPE PS4 PWD SHELL
+               unset BASH HOSTNAME HOSTTYPE IFS MACHTYPE OLDPWD \
+                       OPTERR OPTIND OSTYPE PS4 PWD SHELL SHLVL
 
                # misc variables inherited from the calling environment
                unset COLORTERM DISPLAY EDITOR LESS LESSOPEN LOGNAME LS_COLORS PAGER \
index a93ead837d5656cef5a67343de2ccc1f2ac57e49..28d5eeed5ac11f666aa280271371a65bdd358aaa 100644 (file)
@@ -860,7 +860,19 @@ class config(object):
 
        # Filter selected variables in the config.environ() method so that
        # they don't needlessly propagate down into the ebuild environment.
-       _environ_filter = frozenset(["ACCEPT_KEYWORDS", "AUTOCLEAN",
+       _environ_filter = []
+
+       # 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",
+       ]
+
+       # portage config variables and variables set directly by portage
+       _environ_filter += [
+               "ACCEPT_KEYWORDS", "AUTOCLEAN",
                "CLEAN_DELAY", "COLLISION_IGNORE", "CONFIG_PROTECT",
                "CONFIG_PROTECT_MASK", "EMERGE_DEFAULT_OPTS",
                "EMERGE_WARNING_DELAY", "FETCHCOMMAND", "FETCHCOMMAND_FTP",
@@ -873,7 +885,10 @@ class config(object):
                "PORTAGE_GPG_KEY", "PORTAGE_RSYNC_EXTRA_OPTS", "PORTAGE_RSYNC_OPTS",
                "PORTAGE_RSYNC_RETRIES", "PORT_LOGDIR", "QUICKPKG_DEFAULT_OPTS",
                "RESUMECOMMAND", "RESUMECOMMAND_HTTP", "RESUMECOMMAND_HTTP",
-               "RESUMECOMMAND_SFTP", "SYNC", "USE_EXPAND_HIDDEN", "USE_ORDER"])
+               "RESUMECOMMAND_SFTP", "SYNC", "USE_EXPAND_HIDDEN", "USE_ORDER",
+       ]
+
+       _environ_filter = frozenset(_environ_filter)
 
        def __init__(self, clone=None, mycpv=None, config_profile_path=None,
                config_incrementals=None, config_root=None, target_root=None,