From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/, bin/
Date: Tue, 1 May 2018 18:15:56 +0000 (UTC) [thread overview]
Message-ID: <1525198547.a0ac6e6727abec8d2482c95b1e84d8df24d78619.zmedico@gentoo> (raw)
commit: a0ac6e6727abec8d2482c95b1e84d8df24d78619
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue May 1 18:14:07 2018 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue May 1 18:15:47 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a0ac6e67
phase-helpers.sh: fix best/has_version -b for cross-prefix
Fixes: 43b6be7423aa ("phase-helpers.sh: Implement -r|-d|-b options for best/has_version")
bin/phase-helpers.sh | 2 +-
pym/portage/tests/emerge/test_simple.py | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 59c19cf67..8b16d7d31 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -912,7 +912,7 @@ ___best_version_and_has_version_common() {
case ${root_arg} in
-r) root=${EROOT} ;;
-d) root=${ESYSROOT} ;;
- -b) root=${BROOT:-/} ;;
+ -b) root=${BROOT:-/${PORTAGE_OVERRIDE_EPREFIX#/}} ;;
esac
else
case ${root_arg} in
diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py
index 17dcd548d..495e22297 100644
--- a/pym/portage/tests/emerge/test_simple.py
+++ b/pym/portage/tests/emerge/test_simple.py
@@ -119,11 +119,13 @@ pkg_preinst() {
"EAPI" : "7_pre1",
"KEYWORDS": "~x86",
"RDEPEND": "dev-libs/D[flag]",
+ "MISC_CONTENT": install_something,
},
"dev-libs/D-1": {
"EAPI" : "7_pre1",
"KEYWORDS": "~x86",
"IUSE" : "flag",
+ "MISC_CONTENT": install_something,
},
"virtual/foo-0": {
"EAPI" : "5",
@@ -326,6 +328,16 @@ pkg_preinst() {
portageq_cmd + ("match", eroot, "dev-libs/D[flag]"),
# Test cross-prefix usage, including chpathtool for binpkgs.
+ # EAPI 7
+ ({"EPREFIX" : cross_prefix},) + \
+ emerge_cmd + ("dev-libs/C",),
+ ({"EPREFIX" : cross_prefix},) + \
+ portageq_cmd + ("has_version", cross_prefix, "dev-libs/C"),
+ ({"EPREFIX" : cross_prefix},) + \
+ portageq_cmd + ("has_version", cross_prefix, "dev-libs/D"),
+ ({"ROOT": cross_root},) + emerge_cmd + ("dev-libs/D",),
+ portageq_cmd + ("has_version", cross_eroot, "dev-libs/D"),
+ # EAPI 5
({"EPREFIX" : cross_prefix},) + \
emerge_cmd + ("--usepkgonly", "dev-libs/A"),
({"EPREFIX" : cross_prefix},) + \
next reply other threads:[~2018-05-01 18:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 18:15 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-01 23:50 [gentoo-commits] proj/portage:master commit in: pym/portage/tests/emerge/, bin/ Zac Medico
2014-11-14 17:29 Zac Medico
2013-03-21 0:38 Zac Medico
2013-02-10 20:14 Zac Medico
2011-09-07 17:50 Zac Medico
2011-09-05 22:36 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=1525198547.a0ac6e6727abec8d2482c95b1e84d8df24d78619.zmedico@gentoo \
--to=zmedico@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