1 |
On Sun, 2 Sep 2018 15:03:28 -0700 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> Since BROOT is only defined in src_* phases, make has/best_version -b |
5 |
> use the equivalent /${PORTAGE_OVERRIDE_EPREFIX#/} value that is |
6 |
> defined in all phases. This makes has/best_version -b in EAPI 7 |
7 |
> behave exactly the same as --host-root behaves in EAPI 6, allowing |
8 |
> python ebuilds to call python_setup in any ebuild phase. |
9 |
> |
10 |
> Bug: https://bugs.gentoo.org/665038 |
11 |
> --- |
12 |
> bin/phase-helpers.sh | 7 ++++++- |
13 |
> 1 file changed, 6 insertions(+), 1 deletion(-) |
14 |
> |
15 |
> diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh |
16 |
> index 5c9f957e9..ba3f27930 100644 |
17 |
> --- a/bin/phase-helpers.sh |
18 |
> +++ b/bin/phase-helpers.sh |
19 |
> @@ -916,7 +916,12 @@ ___best_version_and_has_version_common() { |
20 |
> case ${root_arg} in |
21 |
> -r) |
22 |
> root=${ROOT%/}/${EPREFIX#/} ;; -d) root=${ESYSROOT} ;; |
23 |
> - -b) root=${BROOT:-/} ;; |
24 |
> + -b) |
25 |
> + # |
26 |
> Use /${PORTAGE_OVERRIDE_EPREFIX#/} which is equivalent |
27 |
> + # to BROOT, except |
28 |
> BROOT is only defined in src_* phases. |
29 |
> + |
30 |
> root=/${PORTAGE_OVERRIDE_EPREFIX#/} |
31 |
> + cmd+=(env |
32 |
> EPREFIX="${PORTAGE_OVERRIDE_EPREFIX}") |
33 |
> + ;; |
34 |
> esac |
35 |
> else |
36 |
> case ${root_arg} in |
37 |
> -- |
38 |
> 2.16.4 |
39 |
> |
40 |
> |
41 |
|
42 |
LGTM |