From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 374261382C5 for ; Mon, 12 Mar 2018 20:12:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 56723E08F5; Mon, 12 Mar 2018 20:12:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 24950E08F5 for ; Mon, 12 Mar 2018 20:12:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F1385335C59 for ; Mon, 12 Mar 2018 20:12:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 83A01242 for ; Mon, 12 Mar 2018 20:12:44 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1520885538.6cb70f9ef0e790050b1d85b2f41d5c1988e5d57d.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/, pym/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/eapi.py pym/portage/package/ebuild/config.py X-VCS-Directories: pym/portage/package/ebuild/ pym/portage/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 6cb70f9ef0e790050b1d85b2f41d5c1988e5d57d X-VCS-Branch: master Date: Mon, 12 Mar 2018 20:12:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 048402cf-c970-48d7-b1d1-7557a0e74189 X-Archives-Hash: e7208d55796a0462647012bb0d9e540c commit: 6cb70f9ef0e790050b1d85b2f41d5c1988e5d57d Author: Michał Górny gentoo org> AuthorDate: Wed Feb 21 08:55:11 2018 +0000 Commit: Michał Górny gentoo 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 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"]