[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MBF: valgrind-if-available



On Sun, Feb 27, 2022 at 01:40:48AM +0100, Ben Hutchings wrote:
> On Sun, 2022-02-20 at 22:43 +0100, Adam Borowski wrote:
> > if which valgrind >/dev/null; then
> 
> This should use "command -v", not which, I think?

No, and the recent debacle revealed enough reasons that I'm pondering a MBF
to change that _back_ in packages which followed the bad advice.

Among others, "command -v"
* gets confused by aliases
* it fails to check +x perm both in dash and bash.  While this is something
  required by POSIX, neither shell in unstable checks that, reporting the
  command as executable if it's not.
* built-ins get reported as available.  And busybox has even "dpkg"
  built-in, with a pretty bad implementation.
while the only reason to migrate was:
* one less tool to maintain


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁                            'Russkiy voyennyi korabl, idi nakhuy'
⢿⡄⠘⠷⠚⠋⠀
⠈⠳⣄⠀⠀⠀⠀


Reply to: