Bug#733511: checkbashisms: wronglu report 'command -v' as a bashism

Aurelien Jarno aurel32 at debian.org
Sun Dec 29 15:35:52 UTC 2013


Package: devscripts
Version: 2.13.9
Severity: normal

checkbashisms consider that command can only take the -p option:

| $ echo -e '#!/bin/sh\ncommand -v ls' > posix.sh
| $ checkbashisms posix.sh 
| possible bashism in posix.sh line 2 ('command' with option other than -p):
| command -v ls
| $

This is not true according to POSIX specification [1], -v and -V shall
also be accepted. They are accepted in practice by both dash and bash.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html


-- Package-specific info:

--- /etc/devscripts.conf ---

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.12-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages devscripts depends on:
ii  dpkg-dev     1.17.5
ii  libc6        2.18-0experimental0
ii  perl         5.18.1-5
ii  python3      3.3.2-17
pn  python3:any  <none>

Versions of packages devscripts recommends:
ii  at                          3.1.14-1
ii  curl                        7.34.0-1
ii  dctrl-tools                 2.23
ii  debian-keyring              2013.12.13
ii  dput                        0.9.6.4
ii  dupload                     2.7.0
ii  equivs                      2.0.9
ii  fakeroot                    1.20-3
ii  gnupg                       1.4.15-3
pn  libdistro-info-perl         <none>
ii  libencode-locale-perl       1.03-1
pn  libjson-perl                <none>
ii  liblwp-protocol-https-perl  6.04-2
ii  libparse-debcontrol-perl    2.005-4
ii  libsoap-lite-perl           0.716-1
ii  liburi-perl                 1.60-1
ii  libwww-perl                 6.05-2
ii  lintian                     2.5.20
ii  man-db                      2.6.5-2
ii  patch                       2.7.1-4
ii  patchutils                  0.3.2-3
pn  python3-debian              <none>
pn  python3-magic               <none>
ii  sensible-utils              0.0.9
ii  strace                      4.5.20-2.3
ii  unzip                       6.0-10
ii  wdiff                       1.2.1-1
ii  wget                        1.14-5
ii  xz-utils                    5.1.1alpha+20120614-2

Versions of packages devscripts suggests:
ii  bsd-mailx [mailx]            8.1.2-0.20131005cvs-1
ii  build-essential              11.6
pn  cvs-buildpackage             <none>
pn  devscripts-el                <none>
ii  gnuplot                      4.6.4-1
ii  gpgv                         1.4.15-3
pn  libauthen-sasl-perl          <none>
pn  libfile-desktopentry-perl    <none>
ii  libnet-smtp-ssl-perl         1.01-3
pn  libterm-size-perl            <none>
ii  libtimedate-perl             2.3000-1
ii  libyaml-syck-perl            1.27-2+b1
ii  mutt                         1.5.21-6.4
ii  openssh-client [ssh-client]  1:6.4p1-2
ii  svn-buildpackage             0.8.5
ii  w3m                          0.5.3-13

-- no debconf information



More information about the devscripts-devel mailing list