Re: [PATCH] emake: explicitly set SHELL
Sam James <[email protected]> Tue, 26 Jul 2022 04:00:54 +0100
| Newsgroups | gmane.linux.gentoo.portage.devel |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_5AECF21A-DD60-4A64-AB07-A019C82E6902 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 25 Jul 2022, at 16:28, Fabian Groffen <[email protected]> wrote: >=20 > bin/ebuild-helpers/emake: force SHELL to be set >=20 > 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). >=20 > 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. >=20 > Signed-off-by: Fabian Groffen <[email protected]> >=20 > 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 >=20 > cmd=3D( > - ${MAKE:-make} ${MAKEOPTS} "$@" ${EXTRA_EMAKE} > + ${MAKE:-make} SHELL=3D"${BASH:-/bin/bash}" ${MAKEOPTS} "$@" = ${EXTRA_EMAKE} > ) >=20 > if [[ ${PORTAGE_QUIET} !=3D 1 ]] ; then >=20 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 --Apple-Mail=_5AECF21A-DD60-4A64-AB07-A019C82E6902 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCYt9Y6V8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kL1vAQDu/EJoV4wZYexZGwiVG1SwjiseOVqegtHRq32UvQuWOgD/QcQWZV0MFDBh ZsdxIF9miGoz5CADkLZ1CigUW4XZ+Qk= =WWF3 -----END PGP SIGNATURE----- --Apple-Mail=_5AECF21A-DD60-4A64-AB07-A019C82E6902--