You are not logged in.
Pages: 1
New in the upcoming debian release https://wiki.debian.org/NewInBookworm
* The which program has been deprecated, and writes a warning to standard error (but still works, so long as stderr is not being captured along with stdout).
For f*** sake why? Completely unnecessary.
Will this make it to daedalus?
Probably a reminder to pin a current version before the release date to avoid stupid error messages.
gnu-which, which.debianutils ... are there more?
Offline
Hello:
For f*** sake why? Completely unnecessary.
Hmm ...
No.
It's
Seriously, just who comes up with these dumb ideas?
which is one of the smartest and most useful Linux commands.
A.
Offline
For f*** sake why?
Rather than whine like a little baby whose favourite toy has been taken away perhaps try some research instead?
I've been aware of the limitations of which for a while now and have preferred type for interactive use simply because it's a better tool for the job but I did some research for you (you're welcome) and found this excellent link explaining exactly why which is such a useless pile of shite that should be avoided by everyone:
https://unix.stackexchange.com/question … o-use-then
Probably a reminder to pin a current version before the release date to avoid stupid error messages.
gnu-which, which.debianutils ... are there more?
That is a really stupid thing to do because the debianutils package also contains commands used in the packaging system so pinning it to an old version will break APT once you try installing packages that rely on newer features.
If you want to keep using which you can either package up the GNU version or install it manually by using these commands:
wget https://ftp.gnu.org/gnu/which/which-2.21.tar.gz # or whatever the latest version is
tar xf which-2.21.tar.gz && cd which-2.21
./configure
make
make install # as root
And to illustrate just how limited and crap which really is:
archie:~$ which ls
/usr/bin/ls
archie:~$ type ls
ls is an alias for 'ls --color'
archie:~$ which kvm
which: no kvm in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
1archie:~$ type kvm
kvm is a function
archie:~$ which scrath
which: no scrath in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
1archie:~$ type scratch
scratch is an alias for 'doas systemd-nspawn --ephemeral --boot --directory=/'
archie:~$
So just drop which completely. It's worse than useless.
Last edited by Head_on_a_Stick (2023-02-09 07:03:23)
Brianna Ghey — Rest In Power
Offline
Settle down a bit, please.
It should be obvious without stupid examples that trying to use a program for something it doesn't do, then it won't provide the output you want.
It's a huge step from there to saying that the program is useless, since then the problem really sits behind the keyboard.
Offline
Settle down a bit, please.
I presume that is directed to the people doing the whining? I've actually provided a solution in my post that doesn't break the packaging system. You're welcome.
Brianna Ghey — Rest In Power
Offline
Yes, your technical advice is likely to be helpful.
But pretending to be an arrogant twit less so, although I can understand that there probably is a constructive basis for that artistic style in your mind.
I am thinking that Bookworm is a release of debian, and as such its developers would or should strive for backward compatibility in as many ways as possible with all of the possible uses of the debian software. I believe it serves the end user community quite badly to make up a "pseudo fight" about which particular software is the better one for some functionality. Especially when it concerns actually removing programs or packages that get deemed to be the lesser good, and certainly where it's widely used software.
I suppose if we keep needing to patch against debian developers' choices, then we end up at that place where debian is no longer our platform. Actually @Head_on_a_Stick, I believe you are well ahead of me there.
Offline
pretending to be an arrogant twit
How dare you! That is outrageous. I'm not pretending at all...
Anyway my advice to manually compile & install GNU's which is bollocks because there's already a package for it in testing/unstable:
$ rmadison gnu-which
gnu-which | 2.21+dfsg-2 | testing | source, amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
gnu-which | 2.21+dfsg-2 | unstable | source, amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
gnu-which | 2.21+dfsg-2 | unstable-debug | source
$
This was alluded to by the OP but I wasn't paying enough attention. Sorry OP.
I am thinking that Bookworm is a release of debian, and as such its developers would or should strive for backward compatibility in as many ways as possible with all of the possible uses of the debian software.
Hence GNU's which being packaged up separately. There is no "problem" here at all. IMO.
Problem solved?
That's an excellent suggestion :-)
I think this will more closely replicate the traditional output though:
alias which='command -v'
But anyway this is rendered moot by the new gnu-which package.
Brianna Ghey — Rest In Power
Offline
It will cause problems for scripts that call which. Unless stderr is sent somewhere harmless such as /dev/null it will either put out the message to the terminal (annoying, but probably the script will still work) or get mixed up with the output the script will try to parse (and probably make the script fail).
https://wiki.debian.org/NewInBookworm says:
Shell script writers are advised to use command -v instead.
But I won't be holding my breath waiting for *every* script calling which to be updated.
which is actually a shell script, so if this proves too annoying you could just update it on your system to comment out the message. And try to remember this if you write a script for someone else that uses which.
Offline
But anyway this is rendered moot by the new gnu-which package.
So why is the default crappy "which" being deprecated instead of just being replaced with GNU's superior version?
Or is the latter what will be happening but the NewInBookworm page hasn't been updated yet?
2021-09-16 01:44:08 ... GregWooledge which(1) deprecated
[2022-03-28] gnu-which 2.21+dfsg-2 MIGRATED to testing (Debian testing watch)
[2022-03-22] Accepted gnu-which 2.21+dfsg-2 (source) into unstable (Boyuan Yang)
3.1415P265E589T932E846R64338
Offline
Trying to find the answer to the above, seems the deprecation may have been reversed in January?
metadata.ftp-master.debian.org/changelogs/main/d/debianutils/testing_changelog
3.1415P265E589T932E846R64338
Offline
I think the NewInBookworm page just hasn't been updated. I don't get a "deprecation" message when I try to use /usr/bin/which.debianutils so perhaps that's been decided against. The mailing lists probably have a discussion about all this but I don't follow them myself because I don't like spoilers.
A quick search brings up https://lists.debian.org/debian-devel/2 … 00283.html, which looks relevant. Can't be bothered reading it all though
EDIT: crossposted, I think my mailing list link continues the discussion at the end of the first bug report.
Last edited by Head_on_a_Stick (2023-02-09 18:36:15)
Brianna Ghey — Rest In Power
Offline
Can't be bothered reading it all though
I regret reading it all. :/
There's not much meaningful discussion - just unanswered questions and disillusionment.
3.1415P265E589T932E846R64338
Offline
Thanks for the input, guys.
Probably it's not as bad as I thought in the first place. De-deprecation seems somewhat likely and gnu-which was included.
Still don't like it when "they" mess around with the basic tool set.
I think the NewInBookworm page just hasn't been updated
Best solution (EDIT:), but bad public relation.
Last edited by delgado (2023-02-15 18:03:22)
Offline
Pages: 1