Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Should we join the which hunt?
Date: Fri, 13 May 2022 15:45:21
In Reply to: [gentoo-dev] Should we join the which hunt? by Ulrich Mueller
1 On Fri, May 13, 2022 at 3:11 AM Ulrich Mueller <ulm@g.o> wrote:
2 >
3 > Recently Debian has started to transition away from the "which" command.
4 > [1]
5 >
6 > which is a non-POSIX command which prints out the location of specified
7 > executables that are in your path. Unfortunately, there are several
8 > versions of the program around which are not compatible with each other.
9 > We package the GNU version as sys-apps/which, which is in the system set
10 > since 2004.
11 >
12 > Already in 2007, vapier asked developers to avoid which in ebuilds. [2]
13 > The replacement in most circumstances is "type -p" which is a bash
14 > builtin command.
15 >
16 > So, should we join the "which hunt", with the goal of removing
17 > sys-apps/which from the system set and from stage1? I think the first
18 > step would be to identify which packages use which, and add it as an
19 > explicit dependency. (Maybe the tinderbox could help there?) A bug for
20 > this [3] has already been filed by mgorny some time ago.
21 >
22 > Unfortunately, the command pops up in unexpected places, e.g. it appears
23 > to be an (indirect) build-time dependency of systemd. [4]
25 "which" is a built-in command in bash, but not in dash. For most
26 users, /bin/sh points at bash and I don't expect to see much breakage
27 when /usr/bin/which is removed. The bug reports will come from people
28 who like pain and run their systems with /bin/sh pointed at dash.


Subject Author
Re: [gentoo-dev] Should we join the which hunt? Mike Gilbert <floppym@g.o>
Re: [gentoo-dev] Should we join the which hunt? Michael Orlitzky <mjo@g.o>