summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-30 09:27:13 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-30 09:27:13 +0000
commit902097729500e779b5ffe103714f73da8530b6fe (patch)
tree7b01151c97add4f1a8a92af97760cdd52b4b1562 /pym
parentf69efaece69719080e53fbba2ee42e47b6897d6a (diff)
downloadportage-902097729500e779b5ffe103714f73da8530b6fe.tar.gz
portage-902097729500e779b5ffe103714f73da8530b6fe.tar.bz2
portage-902097729500e779b5ffe103714f73da8530b6fe.zip
Add some variables such as TERM to the whitelist of variables
from the calling environment that are allowed into the ebuild environment. svn path=/main/trunk/; revision=8763
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 9fff41623..d4539b99a 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -858,16 +858,27 @@ class config(object):
virtuals ...etc you look in here.
"""
+ _environ_whitelist = []
+
# Preserve backupenv values that are initialized in the config
# constructor. Also, preserve XARGS since it is set by the
# portage.data module.
- _environ_whitelist = frozenset([
+ _environ_whitelist += [
"FEATURES", "PORTAGE_BIN_PATH",
"PORTAGE_CONFIGROOT", "PORTAGE_DEPCACHEDIR",
"PORTAGE_GID", "PORTAGE_INST_GID", "PORTAGE_INST_UID",
"PORTAGE_PYM_PATH", "PORTDIR_OVERLAY", "ROOT", "USE_ORDER",
"XARGS",
- ])
+ ]
+
+ # misc variables inherited from the calling environment
+ _environ_whitelist += [
+ "COLORTERM", "DISPLAY", "EDITOR", "LESS",
+ "LESSOPEN", "LOGNAME", "LS_COLORS", "PAGER",
+ "TERM", "TERMCAP", "USER",
+ ]
+
+ _environ_whitelist = frozenset(_environ_whitelist)
# Filter selected variables in the config.environ() method so that
# they don't needlessly propagate down into the ebuild environment.