Re: command -v in postinsts violating policy
> "command -v " does not affect much in terms of usability, and thus of lower priority.
> I doubt if we make service to our users through fixing "command -v " in 600 packages.
Of course we do. There have been people who have linked /bin/sh to zsh
(don't ask me why). If they have installed any of the packages using
"command -v" in their #!/bin/sh scripts, they have been cheated out of
whatever optional services those scripts were looking to provide, since,
by default, "command -v blah blah blah" will fail unless there is a
"-v" command.
This is a disservice to our users. If they read Policy, they will be
hoodwinked into thinking that they can use a POSIX shell (with echo
exception) as /bin/sh.
We can modify policy, in which case anyone wanting to use zsh as /bin/sh
can have zsh load the following function in sh emulation:
command() { case "$1" in -v) shift; whence "$@" ;; *) builtin command
"$@";; esac }
We can change all the maintainer scripts to conform to existing policy.
We can leave policy as it is, and unofficially require "command -v"
support.
I have nothing against raising the bar; the current POSIX requirements
are hardly modern.
I have nothing against policy-compliant scripts.
But why blessing a lie in policy is the option preferred by anyone is
a mystery to me.
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: