On Fri, May 13, 2022 at 3:11 AM Ulrich Mueller <u...@gentoo.org> wrote:
>
> Recently Debian has started to transition away from the "which" command.
> [1]
>
> which is a non-POSIX command which prints out the location of specified
> executables that are in your path. Unfortunately, there are several
> versions of the program around which are not compatible with each other.
> We package the GNU version as sys-apps/which, which is in the system set
> since 2004.
>
> Already in 2007, vapier asked developers to avoid which in ebuilds. [2]
> The replacement in most circumstances is "type -p" which is a bash
> builtin command.
>
> So, should we join the "which hunt", with the goal of removing
> sys-apps/which from the system set and from stage1? I think the first
> step would be to identify which packages use which, and add it as an
> explicit dependency. (Maybe the tinderbox could help there?) A bug for
> this [3] has already been filed by mgorny some time ago.
>
> Unfortunately, the command pops up in unexpected places, e.g. it appears
> to be an (indirect) build-time dependency of systemd. [4]

"which" is a built-in command in bash, but not in dash. For most
users, /bin/sh points at bash and I don't expect to see much breakage
when /usr/bin/which is removed. The bug reports will come from people
who like pain and run their systems with /bin/sh pointed at dash.

Reply via email to