summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-30 09:28:25 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-30 09:28:25 +0000
commitb0cb44635d1216805dd716eea1873275f6cb28e3 (patch)
treedda0ee312746a3c7aedc8b964fe2e3d624fec033
parent1ba69403ceb5b3fe7e75e1781b51a072213e6d32 (diff)
downloadportage-b0cb44635d1216805dd716eea1873275f6cb28e3.tar.gz
portage-b0cb44635d1216805dd716eea1873275f6cb28e3.tar.bz2
portage-b0cb44635d1216805dd716eea1873275f6cb28e3.zip
Add some variables such as TERM to the whitelist of variables
from the calling environment that are allowed into the ebuild environment. (trunk r8763) svn path=/main/branches/2.1.2/; revision=8764
-rw-r--r--pym/portage.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 152cb3e24..6033cf609 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -996,16 +996,27 @@ class config:
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.