Gentoo Archives: gentoo-portage-dev

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] emake: explicitly set SHELL
Date: Thu, 28 Jul 2022 17:36:12
Message-Id: CALaCa4zbRYOJm00bGnZ3CqeA1A12K3RTiNQoJMO9j-G-T3eaOg@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] [PATCH] emake: explicitly set SHELL by Florian Schmaus
1 2022-07-26 07:03 UTCに、Florian Schmaus <flow@g.o>は書いた:
2 > But then I wondered if "make SHELL=$BROOT/bin/sh" wouldn't override
3 > explicitly set SHELL values in Makefiles. Assume a package has
4 >
5 > SHELL = /bin/zsh
6 >
7 > in one of its Makefiles. Then emake would reset this to 'sh'. Which
8 > appears like it could cause build issues.
9 >
10 > If this is the case, then I am not sure what we can do about it. It
11 > appears fragile, if not impossible, to ask 'make' which value for SHELL
12 > it would assume, so that emake could adjust the path. Another option
13 > could be that affected packages define a variable in their ebuild, e.g.
14 > EMAKE_SHELL="zsh", which emake could extend with BROOT before passing
15 > the resulting value as SHELL to make.
16
17 If there was such package, it could just override SHELL on emake invocation:
18
19 src_compile() {
20 emake SHELL="${BROOT}/bin/zsh"
21 # Or:
22 emake SHELL="$(type -P zsh)"
23 }