Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: Michael Orlitzky <mjo@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Should we join the which hunt?
Date: Fri, 13 May 2022 10:05:23
Message-Id: uy1z5sq7h@gentoo.org
In Reply to: Re: [gentoo-dev] Should we join the which hunt? by Michael Orlitzky
1 >>>>> On Fri, 13 May 2022, Michael Orlitzky wrote:
2
3 >> So, should we join the "which hunt", with the goal of removing
4 >> sys-apps/which from the system set and from stage1?
5
6 > Yes, although I would suggest "command -v" as a POSIX replacement that
7 > can be sent upstream. The "type" utility is also standard, but the "-p"
8 > flag is not, so "type -p" creates some pointless bashisms.
9
10 This depends on context. I think with bash "type -p" is the better
11 choice, because it simply prints the path which is machine readable
12 without any postprocessing.
13
14 In other posixly-correct contexts "command -v" may be the best
15 alternative available, indeed.
16
17 > Both are built-in to bash so there's no performance penalty in ebuilds
18 > either way.

Attachments

File name MIME type
signature.asc application/pgp-signature