aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2019-07-07 14:18:54 +0100
committerZac Medico <zmedico@gentoo.org>2019-07-07 23:37:15 -0700
commitcfc3ca6647235d8a3fbe719b9d447863a75deeb6 (patch)
tree6363de113913531327915c10029674ede90e2ac0
parentrepos.conf: Default to using Gentoo keyservers (diff)
downloadportage-cfc3ca6647235d8a3fbe719b9d447863a75deeb6.tar.gz
portage-cfc3ca6647235d8a3fbe719b9d447863a75deeb6.tar.bz2
portage-cfc3ca6647235d8a3fbe719b9d447863a75deeb6.zip
emerge: Don't treat empty EPREFIX or PORTAGE_CONFIGROOT as unset
If a prefix user wanted to build within a ROOT but without a prefix, they previously had to set EPREFIX=/ rather than EPREFIX= as the latter was simply treated as unset. Also applies to ROOT and SYSROOT but probably makes no difference to these as they are blank by default. This should be safe to do as all these variables get normalised anyway. Bug: https://bugs.gentoo.org/642604 Closes: https://github.com/gentoo/portage/pull/434 Signed-off-by: James Le Cuirot <chewi@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--lib/_emerge/actions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py
index 3e32bf8bc..6ca323501 100644
--- a/lib/_emerge/actions.py
+++ b/lib/_emerge/actions.py
@@ -2455,7 +2455,7 @@ def load_emerge_config(emerge_config=None, env=None, **kargs):
for k, envvar in (("config_root", "PORTAGE_CONFIGROOT"), ("target_root", "ROOT"),
("sysroot", "SYSROOT"), ("eprefix", "EPREFIX")):
v = env.get(envvar)
- if v and v.strip():
+ if v is not None:
kwargs[k] = v
emerge_config.trees = portage.create_trees(trees=emerge_config.trees,
**kwargs)