Bug#835498: checkbashisms treats 'command' incorrectly
Adam D. Barratt
adam at adam-barratt.org.uk
Fri Aug 26 11:38:19 UTC 2016
Control: tags -1 + moreinfo
On 2016-08-26 11:47, Eero Vuojolahti wrote:
> Secondly, there are no optional flags listed in the 2008/2013 version
> of the 'command' specification. In the older (2004) standard, the |-v|
> and |-V| options were part of the 'user portability' subset, not part
> of the core.
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
POSIX 2004 might be "older" but it is the version referenced by Debian
Policy - as per
<https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts>:
"Scripts may assume that /bin/sh implements the SUSv3 Shell Command
Language[90] plus the following additional features not mandated by
SUSv3
[list that doesn't mention "command"]
If a shell script requires non-SUSv3 features from the shell interpreter
other than those listed above, the appropriate shell must be specified
in the first line of the script (e.g., #!/bin/bash) and the package must
depend on the package providing the shell (unless the shell package is
marked "Essential", as in the case of bash).
[...]
90
Single UNIX Specification, version 3, which is also IEEE 1003.1-2004
(POSIX), and is available on the World Wide Web from The Open Group
after free registration.
"
checkbashisms's handling of "command" appears to be in line with that
Policy requirement.
Regards,
Adam
More information about the devscripts-devel
mailing list