Re: Proposed new POSIX sh policy
Thomas Bushnell BSG <tb@becket.net> writes:
> I do. Debian test is provided by the coreutils package. As the man
> page says:
> ( EXPRESSION )
> EXPRESSION is true
> And, we have the existing rule in section 10.1 of the policy manual:
> "Two different packages must not install programs with different
> functionality but with the same filenames."
> There does not seem to be any reason to exempt shell builtins from this
> requirement.
I think there are obvious reasons to exempt shell builtins from this
requirement, so you're going to have to present more of an argument than
this. I think this is a very strained reading of that section of Policy,
and in my opinion is "obviously" not what that section is trying to say.
> I conclude that any shell builtin which exhibits a different
> functionality from the official Debian test implementation
> (/usr/bin/test, as distributed by coreutils) is buggy.
So every shell in Debian is buggy, since none of them provide all the
functionality in all of their builtins that coreutils provides. For
example, the bash test builtin does not support the --version flag.
eagle@windlord:~$ [ --version
bash: [: missing `]'
eagle@windlord:~$ /usr/bin/[ --version
[ (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Kevin Braunsdorf and Matthew Bradburn.
That's an obvious example. Here are several more less-obvious examples:
* bash's test builtin implements multiple flags that coreutils test does
not.
* bash's kill builtin does not support long options (--signal and --list)
and does not support the -t or --table option, all of which are
supported by coreutils.
* bash's printf builtin has a -v option to assign the result to a
variable, which is not supported by the coreutils version.
* bash's pwd builtin supports -L and -P options that the coreutils
version does not.
All of these constitute exhibiting different functionality.
This proposal as stated seems to fail a basic sanity test, namely not
declaring buggy the shell we have marked Essential and have been using for
the past 10 years over issues that no one cares about.
> I know you think we can ignore that little problem for the time being,
> but I am less and less sure.
I don't believe that your proposal will help, and in fact I believe it
leaves us in an even worse situation with incompatibility between Policy
and practice than we have right now by requiring shell behavior that is
clearly not implemented by any of the shells in Debian. That's a fairly
extreme thing to do and would require extreme justification.
coreutils may add additional functionality to commands also implemented as
builtins, often functionality that is not horribly important and is added
mostly because there's no reason *not* to add it. I don't think it's
reasonable to expect every shell in Debian which implements builtins to
keep up with those changes. In practice, your proposal to me seems
tatamount to requiring that shells in Debian never implement builtins
except for functions like cd that can only be done through builtins.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: