Gentoo Archives: gentoo-portage-dev

From: Mike Gilbert <floppym@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] emake: explicitly set SHELL
Date: Mon, 25 Jul 2022 23:38:26
Message-Id: CAJ0EP41FNtxef4cGUcpLpagdOEPkJ9K5t4hQLdHggXCTjzpnRg@mail.gmail.com
In Reply to: [gentoo-portage-dev] [PATCH] emake: explicitly set SHELL by Fabian Groffen
1 On Mon, Jul 25, 2022 at 11:28 AM 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 I'm a little on the fence about this: in theory, Makefiles should use
16 POSIX-compatible shell commands unless the author explicitly chooses
17 to use bash.
18
19 I guess we can get away with this since ebuilds always require bash anyway.