aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2018-05-02 17:55:48 -0700
committerZac Medico <zmedico@gentoo.org>2018-05-03 11:45:07 -0700
commit1b5110557d1dd725f7c12bbed4b7ceaaec29f2a3 (patch)
tree42a30372151eee37072235f7a75aa2157f35c8f9 /pym/portage/package
parentrsync: silence signature info for --quiet mode (bug 654664) (diff)
downloadportage-1b5110557d1dd725f7c12bbed4b7ceaaec29f2a3.tar.gz
portage-1b5110557d1dd725f7c12bbed4b7ceaaec29f2a3.tar.bz2
portage-1b5110557d1dd725f7c12bbed4b7ceaaec29f2a3.zip
config.environ: always strip slash from SYSROOT (bug 654600)
Since SYSROOT=/ interacts badly with autotools.eclass (bug 654600), and no EAPI expects SYSROOT to have a trailing slash, always strip the trailing slash from SYSROOT. Bug: https://bugs.gentoo.org/654600 Fixes: a41dacf7926c ("Export SYSROOT and ESYSROOT in ebuild env in EAPI 7") Reviewed-by: James Le Cuirot <chewi@gentoo.org> Reviewed-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Brian Dolbec <dolsen@gentoo.org>
Diffstat (limited to 'pym/portage/package')
-rw-r--r--pym/portage/package/ebuild/config.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index f9b257b86..88acac5cc 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2813,11 +2813,16 @@ class config(object):
mydict.pop("ECLASSDIR", None)
if not eapi_attrs.path_variables_end_with_trailing_slash:
- for v in ("D", "ED", "ROOT", "EROOT", "SYSROOT", "ESYSROOT",
- "BROOT"):
+ for v in ("D", "ED", "ROOT", "EROOT", "ESYSROOT", "BROOT"):
if v in mydict:
mydict[v] = mydict[v].rstrip(os.path.sep)
+ # Since SYSROOT=/ interacts badly with autotools.eclass (bug 654600),
+ # and no EAPI expects SYSROOT to have a trailing slash, always strip
+ # the trailing slash from SYSROOT.
+ if 'SYSROOT' in mydict:
+ mydict['SYSROOT'] = mydict['SYSROOT'].rstrip(os.sep)
+
try:
builddir = mydict["PORTAGE_BUILDDIR"]
distdir = mydict["DISTDIR"]