1 |
Bug: https://bugs.gentoo.org/465772 |
2 |
--- |
3 |
pym/portage/eapi.py | 7 +++++++ |
4 |
pym/portage/package/ebuild/config.py | 5 +++++ |
5 |
2 files changed, 12 insertions(+) |
6 |
|
7 |
diff --git a/pym/portage/eapi.py b/pym/portage/eapi.py |
8 |
index 5613fb5d2..d1ca299f5 100644 |
9 |
--- a/pym/portage/eapi.py |
10 |
+++ b/pym/portage/eapi.py |
11 |
@@ -111,11 +111,16 @@ def eapi_empty_groups_always_true(eapi): |
12 |
return eapi in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi", |
13 |
"5", "5-progress", "6") |
14 |
|
15 |
+def eapi_path_variables_end_with_trailing_slash(eapi): |
16 |
+ return eapi in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi", |
17 |
+ "5", "5-progress", "6") |
18 |
+ |
19 |
_eapi_attrs = collections.namedtuple('_eapi_attrs', |
20 |
'dots_in_PN dots_in_use_flags exports_EBUILD_PHASE_FUNC ' |
21 |
'exports_PORTDIR exports_ECLASSDIR ' |
22 |
'feature_flag_test feature_flag_targetroot ' |
23 |
'hdepend iuse_defaults iuse_effective posixish_locale ' |
24 |
+ 'path_variables_end_with_trailing_slash ' |
25 |
'repo_deps required_use required_use_at_most_one_of slot_operator slot_deps ' |
26 |
'src_uri_arrows strong_blocks use_deps use_dep_defaults ' |
27 |
'empty_groups_always_true') |
28 |
@@ -150,6 +155,8 @@ def _get_eapi_attrs(eapi): |
29 |
hdepend = (eapi is not None and eapi_has_hdepend(eapi)), |
30 |
iuse_defaults = (eapi is None or eapi_has_iuse_defaults(eapi)), |
31 |
iuse_effective = (eapi is not None and eapi_has_iuse_effective(eapi)), |
32 |
+ path_variables_end_with_trailing_slash = (eapi is not None and |
33 |
+ eapi_path_variables_end_with_trailing_slash(eapi)), |
34 |
posixish_locale = (eapi is not None and eapi_requires_posixish_locale(eapi)), |
35 |
repo_deps = (eapi is None or eapi_has_repo_deps(eapi)), |
36 |
required_use = (eapi is None or eapi_has_required_use(eapi)), |
37 |
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py |
38 |
index 10250cf46..898626ecc 100644 |
39 |
--- a/pym/portage/package/ebuild/config.py |
40 |
+++ b/pym/portage/package/ebuild/config.py |
41 |
@@ -2804,6 +2804,11 @@ class config(object): |
42 |
if not eapi_attrs.exports_ECLASSDIR: |
43 |
mydict.pop("ECLASSDIR", None) |
44 |
|
45 |
+ if not eapi_attrs.path_variables_end_with_trailing_slash: |
46 |
+ for v in ("D", "ED", "ROOT", "EROOT"): |
47 |
+ if v in mydict: |
48 |
+ mydict[v] = mydict[v].rstrip(os.path.sep) |
49 |
+ |
50 |
try: |
51 |
builddir = mydict["PORTAGE_BUILDDIR"] |
52 |
distdir = mydict["DISTDIR"] |
53 |
-- |
54 |
2.16.2 |