Re: [PATCH] emake: explicitly set SHELL
Sam James <[email protected]> Tue, 26 Jul 2022 04:02:03 +0100
| Newsgroups | gmane.linux.gentoo.portage.devel |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_7D9CD9E2-2606-4A24-9291-2ECFE37C9C2F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 26 Jul 2022, at 04:00, Sam James <[email protected]> wrote: >=20 >=20 >=20 >> 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 >=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? >=20 Sorry, ${BROOT}, I guess. > I might use Bash for Portage but my /bin/sh is dash usually. >=20 >> -- >> Fabian Groffen >> Gentoo on a different level --Apple-Mail=_7D9CD9E2-2606-4A24-9291-2ECFE37C9C2F 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+RkAUCYt9ZLF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kJ8+AQD3Q1AZsFZdCM2RIJkPPVl7/181Cu41Zn/dj7qlRt37lQEAhYasDUBkeS/w Nj+fUNHO4mPQf79eeClklelNYlr4nw8= =nAmX -----END PGP SIGNATURE----- --Apple-Mail=_7D9CD9E2-2606-4A24-9291-2ECFE37C9C2F--