Filter more misc environment variables. (trunk r8676)
authorZac Medico <zmedico@gentoo.org>
Mon, 26 Nov 2007 04:08:39 +0000 (04:08 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 26 Nov 2007 04:08:39 +0000 (04:08 -0000)
svn path=/main/branches/2.1.2/; revision=8677

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

index 30d57526604d8c43d9a93e91ad8933ce9eb90e22..446df8309a33aa227f2951ae89fc2fb7026b7505 100644 (file)
@@ -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 4d1762efcb0925ebb794b0aa9867f137ed5c11e5..31902c7e33b319a4e7737ef5ad4fae09178c9c43 100644 (file)
@@ -964,7 +964,19 @@ class config:
 
        # 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",
@@ -977,7 +989,10 @@ class config:
                "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,