1 |
> On 25 Jul 2022, at 16:28, Fabian Groffen <grobian@g.o> wrote: |
2 |
> |
3 |
> bin/ebuild-helpers/emake: force SHELL to be set |
4 |
> |
5 |
> On Prefix systems /bin/sh can be anything, including very ancient. So |
6 |
> ensure we're running with bash, since that's what Gentoo Linux is |
7 |
> expecting /bin/sh to be (by default, at least). |
8 |
> |
9 |
> Provide a fallback for the (near impossible) case that we use a bash |
10 |
> that doesn't set BASH, or when we don't use bash at all. This is not |
11 |
> expected, though, as we explicitly require bash throughout all Portage, |
12 |
> so we don't really care about using a non-Prefixed one, for this really |
13 |
> shouldn't happen. |
14 |
> |
15 |
> Signed-off-by: Fabian Groffen <grobian@g.o> |
16 |
> |
17 |
> diff --git a/bin/ebuild-helpers/emake b/bin/ebuild-helpers/emake |
18 |
> index 60718a2e4..21da85845 100755 |
19 |
> --- a/bin/ebuild-helpers/emake |
20 |
> +++ b/bin/ebuild-helpers/emake |
21 |
> @@ -12,7 +12,7 @@ |
22 |
> source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1 |
23 |
> |
24 |
> cmd=( |
25 |
> - ${MAKE:-make} ${MAKEOPTS} "$@" ${EXTRA_EMAKE} |
26 |
> + ${MAKE:-make} SHELL="${BASH:-/bin/bash}" ${MAKEOPTS} "$@" ${EXTRA_EMAKE} |
27 |
> ) |
28 |
> |
29 |
> if [[ ${PORTAGE_QUIET} != 1 ]] ; then |
30 |
> |
31 |
|
32 |
I don't think I agree with this as it is. Why not just ${EPREFIX}/bin/sh to avoid using |
33 |
an ancient host sh? |
34 |
|
35 |
I might use Bash for Portage but my /bin/sh is dash usually. |
36 |
|
37 |
> -- |
38 |
> Fabian Groffen |
39 |
> Gentoo on a different level |