-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove which
from shell invocations (second attempt)
#16807
base: master
Are you sure you want to change the base?
Remove which
from shell invocations (second attempt)
#16807
Conversation
Relevant Debian issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993582 |
Putting this on hold per flag for probably a long time (probably until Ubuntu 22.04 LTS, which doesn't even have a name yet, is used in CI). |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
I'm giving this another period of getting-stale -- the pressing need is gone, but the concern that |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
We now do have the CI updated. Giving it a run as it is before rebasing. |
@chrysn Ping. If you rebase & fix conflicts, I'll give it a review. |
430566f
to
5463917
Compare
As the POSIX documentation[1] of `command -v` guarantees that on error there will be no output (and there will be output in the other cases), the tests in Makefiles were simplified to test for output equality to the empty string. Redirects swallowing error outputs were removed, as the command produces no error output there (as recommended at [2]). Existing uses of `command` are simplified as well. [1]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html [2]: https://salsa.debian.org/debian/debianutils/-/blob/master/debian/NEWS
... as that command is deprecated at least on Debian, and a good replacement is available in the form of `command -v`.
5463917
to
87df0fa
Compare
While some implementations of `command` accept extra arguments like `which` does, and act on them in sequence, POSIX does not prescribe that, and dash just processes one argument.
CI discovered a really nasty bug in the migration from which to command-v: Different implementations of the latter may or may not tolerate multiple arguments. |
@Teufelchen1, could you review this after the hardfreeze? |
Contribution description
This is #16776 re-done, with some parts on the faster track of #16806 (which this is based on).
It removes all invocations of the unstandardized
which
with the POSIX standardcommand -v
, because Debian'swhich
complains loudly when used.Trouble
Thing is: GNU Make < 4.3 (all recent Ubuntus) thinks it's clever and falls apart completely with this. That's why this is a Draft PR, and more kept for contemplation than for immediate merging.
Testing procedure
None so far.
Don't switch off "skip build tests".
Issues/PRs references
This was done already in #16776 and reverted in #16803.