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