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

Re: command -v in postinsts violating policy



On Sat, May 25, 2002 at 03:42:40PM -0400, Clint Adams wrote:
> Below is a list of packages that may use 'command -v' in their #!/bin/sh
> postinsts.  Section 11.4 of Policy states that /bin/sh can be a symlink
> to any POSIX-compatible shell, with an exception for 'echo', and that
> package #!/bin/sh scripts must not use "non-POSIX" features. 

The Single Unix Specification requires the "command" exists:
http://www.opengroup.org/onlinepubs/007908799/xcu/command.html. SUS is
the layman's POSIX.

> Since there is no 'command' binary in a package marked Essential,

...it has to be a built in in all the shells we ship as /bin/sh candidates
and it is (verified for bash and ash, anyway).

> 3) Writing a 'command' program which will go into an Essential package,
> then filing bugs against all packages that use 'command -v' without
> specifying the absolute path to said 'command'.

If anything is to be done about this (and nothing /needs/ to be done
about it since nothing is actually broken), a /bin/command could be
added to an essential: yes package, maybe debianutils or shellutils.
No dependencies need to be changed because nothing's broken without a
non-builtin command. (Any new shells that get packaged that wish to be
suitable to be used as /bin/sh would need to have a versioned dependency,
though)

Cheers,
aj

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

     ``BAM! Science triumphs again!'' 
                    -- http://www.angryflower.com/vegeta.gif

Attachment: pgpIZp4BO9AsY.pgp
Description: PGP signature


Reply to: