From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/, pym/portage/package/ebuild/
Date: Mon, 12 Mar 2018 20:12:44 +0000 (UTC) [thread overview]
Message-ID: <1520885538.6cb70f9ef0e790050b1d85b2f41d5c1988e5d57d.mgorny@gentoo> (raw)
commit: 6cb70f9ef0e790050b1d85b2f41d5c1988e5d57d
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 21 08:55:11 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Mar 12 20:12:18 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=6cb70f9e
Strip trailing slash from D, ED, ROOT, EROOT in EAPI 7
Bug: https://bugs.gentoo.org/465772
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
pym/portage/eapi.py | 7 +++++++
pym/portage/package/ebuild/config.py | 5 +++++
2 files changed, 12 insertions(+)
diff --git a/pym/portage/eapi.py b/pym/portage/eapi.py
index 5613fb5d2..d1ca299f5 100644
--- a/pym/portage/eapi.py
+++ b/pym/portage/eapi.py
@@ -111,11 +111,16 @@ def eapi_empty_groups_always_true(eapi):
return eapi in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
"5", "5-progress", "6")
+def eapi_path_variables_end_with_trailing_slash(eapi):
+ return eapi in ("0", "1", "2", "3", "4", "4-python", "4-slot-abi",
+ "5", "5-progress", "6")
+
_eapi_attrs = collections.namedtuple('_eapi_attrs',
'dots_in_PN dots_in_use_flags exports_EBUILD_PHASE_FUNC '
'exports_PORTDIR exports_ECLASSDIR '
'feature_flag_test feature_flag_targetroot '
'hdepend iuse_defaults iuse_effective posixish_locale '
+ 'path_variables_end_with_trailing_slash '
'repo_deps required_use required_use_at_most_one_of slot_operator slot_deps '
'src_uri_arrows strong_blocks use_deps use_dep_defaults '
'empty_groups_always_true')
@@ -150,6 +155,8 @@ def _get_eapi_attrs(eapi):
hdepend = (eapi is not None and eapi_has_hdepend(eapi)),
iuse_defaults = (eapi is None or eapi_has_iuse_defaults(eapi)),
iuse_effective = (eapi is not None and eapi_has_iuse_effective(eapi)),
+ path_variables_end_with_trailing_slash = (eapi is not None and
+ eapi_path_variables_end_with_trailing_slash(eapi)),
posixish_locale = (eapi is not None and eapi_requires_posixish_locale(eapi)),
repo_deps = (eapi is None or eapi_has_repo_deps(eapi)),
required_use = (eapi is None or eapi_has_required_use(eapi)),
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 10250cf46..898626ecc 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -2804,6 +2804,11 @@ class config(object):
if not eapi_attrs.exports_ECLASSDIR:
mydict.pop("ECLASSDIR", None)
+ if not eapi_attrs.path_variables_end_with_trailing_slash:
+ for v in ("D", "ED", "ROOT", "EROOT"):
+ if v in mydict:
+ mydict[v] = mydict[v].rstrip(os.path.sep)
+
try:
builddir = mydict["PORTAGE_BUILDDIR"]
distdir = mydict["DISTDIR"]
next reply other threads:[~2018-03-12 20:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 20:12 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-01-25 8:40 [gentoo-commits] proj/portage:master commit in: pym/portage/, pym/portage/package/ebuild/ Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1520885538.6cb70f9ef0e790050b1d85b2f41d5c1988e5d57d.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox