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

Bug#381800: lintian: [checks/scripts] unjustified possible-bashism-in-maintainer-script



Package: lintian
Version: 1.23.22
Severity: normal


Currently, lintian reports the shell construct 'if [[ ... ]]' as
bashism. I am not sure this is correct, since all POSIX 1003.2 resources
available to me declare '[[' and ']]' a standard conditional expression
check in POSIX sh (don't confuse with older Bourne sh). See, for
example:

  http://www.informatik.uni-frankfurt.de/doc/man/hpux/sh-posix.1.html
  http://web.gat.com/docview/sh-posix.html

Once this is fixed, as a side effect, lintian will allow compound
conditional expressions, like 'if [[ ... && ... || ... ]]', which are
not allowed right now (lintian claims that '[['' is a bashism, it also
bans 'if [ ... -a ...]' and 'if [ ... && ... ]' is syntactically
incorrect anyway).

Thanks in advance,
-- Sasha

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-486
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages lintian depends on:
ii  binutils                 2.17-2          The GNU assembler, linker and bina
ii  diffstat                 1.43-1          produces graph of changes introduc
ii  dpkg-dev                 1.13.21         package building tools for Debian
ii  file                     4.17-2          Determines file type using "magic"
ii  gettext                  0.14.6-1        GNU Internationalization utilities
ii  intltool-debian          0.35.0+20060710 Help i18n of RFC822 compliant conf
ii  libparse-debianchangelog 1.0-1           parse Debian changelogs and output
ii  man-db                   2.4.3-3         The on-line manual pager
ii  perl [libdigest-md5-perl 5.8.8-4         Larry Wall's Practical Extraction 

lintian recommends no packages.

-- no debconf information



Reply to: