Subject: Re: [bug#74962] [PATCH v3 4/5] etc/guix-install.sh: Remove 'which' commands from requirements.

From: Maxim Cournoyer <[email-masked]>
Date: Sun, 29 Dec 2024 11:26:57 +0900

Hi,

Ludovic Courtès <[email-masked]> writes:

> Simon Josefsson <[email-masked]> skribis:
>
>> Ludovic Courtès <[email-masked]> writes:
>>
>>> Maxim Cournoyer <[email-masked]> skribis:
>>>
>>>> * etc/guix-install.sh (REQUIRE): Remove "which".  Add "nologin".
>>>> (sys_create_build_user): Use 'type' instead of 'which'.
>>>>
>>>> Fixes: <https://issues.guix.gnu.org/74952>
>>>> Reported-by: Simon Josefsson <[email-masked]>
>>>> Change-Id: I0675716bab3fc22d3289ee7af2cb0ab33a1cee71
>>>
>>> LGTM.
>>
>> Using 'type -P' is not POSIX and neither /bin/dash nor /bin/gash
>> supports it.  It seems like a GNU bash extension.  Is that okay?
>
> Oh, not great.  From what you write, I’m not sure what to conclude;
> just skip this patch and be done with it?

We currently use other Bash-specific features, so I think it's fine to
embrace the Bash requirement instead of shying away from it.

If we decide that we don't want Bash as a requirement at some point,
we'll have to change a bunch of things; one of them would be to no
longer make use of arrays since POSIX shells don't have them, for
example.

-- 
Thanks,
Maxim