Discussion:
[gentoo-portage-dev] [PATCH] config.environ: always strip slash from SYSROOT (bug 654600)
Zac Medico
2018-05-03 01:03:38 UTC
Permalink
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")
---
pym/portage/package/ebuild/config.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index f9b257b86..96b2ebb71 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.path.sep)
+
try:
builddir = mydict["PORTAGE_BUILDDIR"]
distdir = mydict["DISTDIR"]
--
2.13.6
Brian Dolbec
2018-05-03 09:30:09 UTC
Permalink
On Wed, 2 May 2018 18:03:38 -0700
Post by Zac Medico
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") ---
pym/portage/package/ebuild/config.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/pym/portage/package/ebuild/config.py
b/pym/portage/package/ebuild/config.py index f9b257b86..96b2ebb71
100644 --- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
mydict.pop("ECLASSDIR", None)
if not
- for v in ("D", "ED", "ROOT", "EROOT",
"SYSROOT", "ESYSROOT",
+ for v in ("D", "ED", "ROOT", "EROOT",
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.
+ mydict['SYSROOT'] =
mydict['SYSROOT'].rstrip(os.path.sep) +
builddir = mydict["PORTAGE_BUILDDIR"]
distdir = mydict["DISTDIR"]
looks good
--
Brian Dolbec <dolsen>
Zac Medico
2018-05-04 17:37:58 UTC
Permalink
Post by Brian Dolbec
On Wed, 2 May 2018 18:03:38 -0700
Post by Zac Medico
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") ---
pym/portage/package/ebuild/config.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/pym/portage/package/ebuild/config.py
b/pym/portage/package/ebuild/config.py index f9b257b86..96b2ebb71
100644 --- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
mydict.pop("ECLASSDIR", None)
if not
- for v in ("D", "ED", "ROOT", "EROOT",
"SYSROOT", "ESYSROOT",
+ for v in ("D", "ED", "ROOT", "EROOT",
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.
+ mydict['SYSROOT'] =
mydict['SYSROOT'].rstrip(os.path.sep) +
builddir = mydict["PORTAGE_BUILDDIR"]
distdir = mydict["DISTDIR"]
looks good
Thanks, merged:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=1b5110557d1dd725f7c12bbed4b7ceaaec29f2a3
--
Thanks,
Zac
Loading...