summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-06-07 22:40:29 +0000
committerZac Medico <zmedico@gentoo.org>2008-06-07 22:40:29 +0000
commit2a3eb60896e620125c409076a7c032e19617b76d (patch)
tree7d9b52e019ce66b1eaf65caf438a2dc6092e95e2
parent46d1dd0119ccab4bfc2a4ebb562592e5bb7c36a7 (diff)
downloadportage-2a3eb60896e620125c409076a7c032e19617b76d.tar.gz
portage-2a3eb60896e620125c409076a7c032e19617b76d.tar.bz2
portage-2a3eb60896e620125c409076a7c032e19617b76d.zip
Make load_emerge_config() filter out empty PORTAGE_CONFIGROOT and ROOT
values, and those containing only whitespace. svn path=/main/trunk/; revision=10594
-rw-r--r--pym/_emerge/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 1b5de6641..65de5aeea 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -8842,7 +8842,9 @@ def validate_ebuild_environment(trees):
def load_emerge_config(trees=None):
kwargs = {}
for k, envvar in (("config_root", "PORTAGE_CONFIGROOT"), ("target_root", "ROOT")):
- kwargs[k] = os.environ.get(envvar, None)
+ v = os.environ.get(envvar, None)
+ if v and v.strip():
+ kwargs[k] = v
trees = portage.create_trees(trees=trees, **kwargs)
for root, root_trees in trees.iteritems():