summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-01 08:38:31 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-01 08:38:31 +0000
commitfb2a8d9f250d1e0413b9e2b117e53ffea0284366 (patch)
treedd79866bedce1cf02454f33769ee01e2f2bc24b4
parente4c2dc27aa228c9714c02efaa853e745510755ab (diff)
downloadportage-fb2a8d9f250d1e0413b9e2b117e53ffea0284366.tar.gz
portage-fb2a8d9f250d1e0413b9e2b117e53ffea0284366.tar.bz2
portage-fb2a8d9f250d1e0413b9e2b117e53ffea0284366.zip
In create_trees(), when isolating the environment of the ROOT=/ config,
use it's env.d keys as a blacklist to make env.d override the calling environment. svn path=/main/trunk/; revision=8785
-rw-r--r--pym/portage/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 204170038..1c2488e33 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -6043,11 +6043,13 @@ def create_trees(config_root=None, target_root=None, trees=None):
backupenv_whitelist = settings._environ_whitelist
backupenv = settings.configdict["backupenv"]
+ env_d = settings.configdict["env.d"]
for k, v in os.environ.iteritems():
if k in backupenv_whitelist:
continue
- if v == backupenv.get(k):
- del backupenv[k]
+ if k in env_d or \
+ v == backupenv.get(k):
+ backupenv.pop(k, None)
settings.regenerate()
settings.lock()
settings.validate()