Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, Brian Dolbec <dolsen@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] phase-helpers.sh: has/best_version -b in any phase (bug 665038)
Date: Mon, 03 Sep 2018 18:33:40
Message-Id: e1346106-60b6-d199-0c07-87d8e2f5e8f7@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] phase-helpers.sh: has/best_version -b in any phase (bug 665038) by Brian Dolbec
1 On 09/02/2018 04:20 PM, Brian Dolbec wrote:
2 > On Sun, 2 Sep 2018 15:03:28 -0700
3 > Zac Medico <zmedico@g.o> wrote:
4 >
5 >> Since BROOT is only defined in src_* phases, make has/best_version -b
6 >> use the equivalent /${PORTAGE_OVERRIDE_EPREFIX#/} value that is
7 >> defined in all phases. This makes has/best_version -b in EAPI 7
8 >> behave exactly the same as --host-root behaves in EAPI 6, allowing
9 >> python ebuilds to call python_setup in any ebuild phase.
10 >>
11 >> Bug: https://bugs.gentoo.org/665038
12 >> ---
13 >> bin/phase-helpers.sh | 7 ++++++-
14 >> 1 file changed, 6 insertions(+), 1 deletion(-)
15 >>
16 >> diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
17 >> index 5c9f957e9..ba3f27930 100644
18 >> --- a/bin/phase-helpers.sh
19 >> +++ b/bin/phase-helpers.sh
20 >> @@ -916,7 +916,12 @@ ___best_version_and_has_version_common() {
21 >> case ${root_arg} in
22 >> -r)
23 >> root=${ROOT%/}/${EPREFIX#/} ;; -d) root=${ESYSROOT} ;;
24 >> - -b) root=${BROOT:-/} ;;
25 >> + -b)
26 >> + #
27 >> Use /${PORTAGE_OVERRIDE_EPREFIX#/} which is equivalent
28 >> + # to BROOT, except
29 >> BROOT is only defined in src_* phases.
30 >> +
31 >> root=/${PORTAGE_OVERRIDE_EPREFIX#/}
32 >> + cmd+=(env
33 >> EPREFIX="${PORTAGE_OVERRIDE_EPREFIX}")
34 >> + ;;
35 >> esac
36 >> else
37 >> case ${root_arg} in
38 >> --
39 >> 2.16.4
40 >>
41 >>
42 >
43 > LGTM
44
45 Thanks, merged:
46
47 https://gitweb.gentoo.org/proj/portage.git/commit/?id=102220e1f71341e9bc85236074813f191bb389a4
48 --
49 Thanks,
50 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature