Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/
Date: Thu, 03 May 2018 18:48:17
Message-Id: 1525373107.1b5110557d1dd725f7c12bbed4b7ceaaec29f2a3.zmedico@gentoo
1 commit: 1b5110557d1dd725f7c12bbed4b7ceaaec29f2a3
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 3 00:55:48 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Thu May 3 18:45:07 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1b511055
7
8 config.environ: always strip slash from SYSROOT (bug 654600)
9
10 Since SYSROOT=/ interacts badly with autotools.eclass (bug 654600),
11 and no EAPI expects SYSROOT to have a trailing slash, always strip
12 the trailing slash from SYSROOT.
13
14 Bug: https://bugs.gentoo.org/654600
15 Fixes: a41dacf7926c ("Export SYSROOT and ESYSROOT in ebuild env in EAPI 7")
16 Reviewed-by: James Le Cuirot <chewi <AT> gentoo.org>
17 Reviewed-by: Michał Górny <mgorny <AT> gentoo.org>
18 Reviewed-by: Brian Dolbec <dolsen <AT> gentoo.org>
19
20 pym/portage/package/ebuild/config.py | 9 +++++++--
21 1 file changed, 7 insertions(+), 2 deletions(-)
22
23 diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
24 index f9b257b86..88acac5cc 100644
25 --- a/pym/portage/package/ebuild/config.py
26 +++ b/pym/portage/package/ebuild/config.py
27 @@ -2813,11 +2813,16 @@ class config(object):
28 mydict.pop("ECLASSDIR", None)
29
30 if not eapi_attrs.path_variables_end_with_trailing_slash:
31 - for v in ("D", "ED", "ROOT", "EROOT", "SYSROOT", "ESYSROOT",
32 - "BROOT"):
33 + for v in ("D", "ED", "ROOT", "EROOT", "ESYSROOT", "BROOT"):
34 if v in mydict:
35 mydict[v] = mydict[v].rstrip(os.path.sep)
36
37 + # Since SYSROOT=/ interacts badly with autotools.eclass (bug 654600),
38 + # and no EAPI expects SYSROOT to have a trailing slash, always strip
39 + # the trailing slash from SYSROOT.
40 + if 'SYSROOT' in mydict:
41 + mydict['SYSROOT'] = mydict['SYSROOT'].rstrip(os.sep)
42 +
43 try:
44 builddir = mydict["PORTAGE_BUILDDIR"]
45 distdir = mydict["DISTDIR"]