> On 25 Jul 2022, at 16:28, Fabian Groffen <grob...@gentoo.org> wrote: > > bin/ebuild-helpers/emake: force SHELL to be set > > On Prefix systems /bin/sh can be anything, including very ancient. So > ensure we're running with bash, since that's what Gentoo Linux is > expecting /bin/sh to be (by default, at least). > > Provide a fallback for the (near impossible) case that we use a bash > that doesn't set BASH, or when we don't use bash at all. This is not > expected, though, as we explicitly require bash throughout all Portage, > so we don't really care about using a non-Prefixed one, for this really > shouldn't happen. > > Signed-off-by: Fabian Groffen <grob...@gentoo.org> > > diff --git a/bin/ebuild-helpers/emake b/bin/ebuild-helpers/emake > index 60718a2e4..21da85845 100755 > --- a/bin/ebuild-helpers/emake > +++ b/bin/ebuild-helpers/emake > @@ -12,7 +12,7 @@ > source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1 > > cmd=( > - ${MAKE:-make} ${MAKEOPTS} "$@" ${EXTRA_EMAKE} > + ${MAKE:-make} SHELL="${BASH:-/bin/bash}" ${MAKEOPTS} "$@" ${EXTRA_EMAKE} > ) > > if [[ ${PORTAGE_QUIET} != 1 ]] ; then >
I don't think I agree with this as it is. Why not just ${EPREFIX}/bin/sh to avoid using an ancient host sh? I might use Bash for Portage but my /bin/sh is dash usually. > -- > Fabian Groffen > Gentoo on a different level
signature.asc
Description: Message signed with OpenPGP