Live data from Hacker News

Debian 12 “Bookworm” Enters Its Soft Freeze

lists.debian.org

1–10 of 27 posts

Re: Debian 12 “Bookworm” Enters Its Soft Freeze

#3
One interesting change:

> 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). Shell script writers are advised to use command -v instead. Interactive bash shell users are advised to use type, or type -a. In zsh which is already a shell builtin, so interactive zsh users are not affected.

Re: Debian 12 “Bookworm” Enters Its Soft Freeze

#4
post #3

One interesting change: > 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). Shell script writers are advised to use command -v instead. Interactive bash shell users are advised to use type, or type -a. In zsh which is already a shell builtin, so interactive zsh users are not affected.

Beware -- command -v does not have the same semantics as which, and is not a substitute for it in shell scripts. There is no direct substitute. See: https://github.com/koalaman/shellcheck/issues/1162

Re: Debian 12 “Bookworm” Enters Its Soft Freeze

#5
post #4
post #3

One interesting change: > 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). Shell script writers are advised to use command -v instead. Interactive bash shell users are advised to use type, or type -a. In zsh which is already a shell builtin, so interactive zsh users are not affected.

Beware -- command -v does not have the same semantics as which, and is not a substitute for it in shell scripts. There is no direct substitute. See: https://github.com/koalaman/shellcheck/issues/1162

For most purposes, the difference is pretty nuanced and unlikely to cause a problem in real life.

> 'command -v' also returns 0 for shell built-ins, whereas 'which' only searches $PATH.

In what cases is one using anything to check for a built-in shell command? I've written quite a lot of bash, and this has never come up.

I've learned to prefer 'command -v' because it's always available, whereas on minimal or busybox installs sometimes 'which' is not included.

The annoying part seems to be more that the ergonomics of a single straightforwardly-named command (e.g. 'which') are friendlier and easier to remember compared to an unintuitively-named command requiring the addition of a flag.

Why can't we move in a more ergonomic direction by promoting 'which' to a BASH built-in?

Re: Debian 12 “Bookworm” Enters Its Soft Freeze

#6
post #3

One interesting change: > 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). Shell script writers are advised to use command -v instead. Interactive bash shell users are advised to use type, or type -a. In zsh which is already a shell builtin, so interactive zsh users are not affected.

This is ridiculous, isn't it just a shell script? Why would they get rid of it? I don't get it.

Re: Debian 12 “Bookworm” Enters Its Soft Freeze

#7
post #3

One interesting change: > 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). Shell script writers are advised to use command -v instead. Interactive bash shell users are advised to use type, or type -a. In zsh which is already a shell builtin, so interactive zsh users are not affected.

This is ridiculous, isn't it just a shell script? Why would they get rid of it? I don't get it.

There was discussion about it.

https://news.ycombinator.com/item?id=29026623

Re: Debian 12 “Bookworm” Enters Its Soft Freeze

#9
post #3

One interesting change: > 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). Shell script writers are advised to use command -v instead. Interactive bash shell users are advised to use type, or type -a. In zsh which is already a shell builtin, so interactive zsh users are not affected.

What's the long form of "-v"? Shell scripts should use long form options for clarity. As it stands, `command -v` is inscrutable.

Re: Debian 12 “Bookworm” Enters Its Soft Freeze

#10
post #8

Yes! Gstreamer v1.22 made the cut! So much great stuff. I was worried-- actually I though the freeze had already started... softer-freeze? https://gstreamer.freedesktop.org/releases/1.22/ https://news.ycombinator.com/item?id=34505574

Transition and toolchain freeze (https://release.debian.org/testing/freeze_policy.html#transi...), where certain critical packages (https://release.debian.org/testing/essential-and-build-essen...) are frozen and updates are discouraged (not blocked) unless that the update would be too onerous to bugtest.
Post reply on HN