[Pkg-xen-devel] Bug#690630: blktap-utils: bashism in /bin/sh script
Raphael Geissert
atomo64 at gmail.com
Tue Oct 16 02:59:48 UTC 2012
Package: blktap-utils
Version: 2.0.90-1
Severity: important
User: debian-release at lists.debian.org
Usertags: goal-dash
Hello maintainer,
While performing an archive wide checkbashisms (from the 'devscripts'
package) check I've found your package containing a /bin/sh script making
use of a bashism.
checkbashisms' output:
>possible bashism in ./usr/sbin/vhdpartx line 40 (alternative test command
([[ foo ]] should be [ foo ])):
> [[ -z "$lib" ]] && lib=$LIBVHDIO
>
>possible bashism in ./usr/sbin/vhdpartx line 41 (alternative test command
([[ foo ]] should be [ foo ])):
> [[ -z "$vhd" || "$count" != "1" ]] && usage
>
>possible bashism in ./usr/sbin/vhdpartx line 51 (alternative test command
([[ foo ]] should be [ foo ])):
> [[ -n "$none" ]] && partitions=0 && return 0
>
>possible bashism in ./usr/sbin/vhdpartx line 54 (alternative test command
([[ foo ]] should be [ foo ])):
> while [[ "$partitions" != "0" ]]; do
>possible bashism in ./usr/sbin/vhdpartx line 56 (alternative test command
([[ foo ]] should be [ foo ])):
> [[ -n "$hit" ]] && break
>possible bashism in ./usr/sbin/vhdpartx line 57 (let ...):
> let partitions=$partitions-1
>possible bashism in ./usr/sbin/vhdpartx line 69 (alternative test command
([[ foo ]] should be [ foo ])):
> while [[ $parts -le $partitions ]]; do
>possible bashism in ./usr/sbin/vhdpartx line 71 (let ...):
> let parts=$parts+1
>possible bashism in ./usr/sbin/vhdpartx line 79 (alternative test command
([[ foo ]] should be [ foo ])):
> while [[ $parts -le $partitions ]]; do
>possible bashism in ./usr/sbin/vhdpartx line 80 (alternative test command
([[ foo ]] should be [ foo ])):
> [[ -e ${path}${parts} ]] || ln -s $(basename $path) ${path}$parts
>possible bashism in ./usr/sbin/vhdpartx line 81 (let ...):
> let parts=$parts+1
>possible bashism in ./usr/sbin/vhdpartx line 88 (alternative test command
([[ foo ]] should be [ foo ])):
> while [[ $parts -le $partitions ]]; do
>possible bashism in ./usr/sbin/vhdpartx line 89 (alternative test command
([[ foo ]] should be [ foo ])):
> [[ -L ${vhd}$parts ]] && rm -f ${vhd}$parts
>possible bashism in ./usr/sbin/vhdpartx line 90 (let ...):
> let parts=$parts+1
>possible bashism in ./usr/sbin/vhdpartx line 97 (alternative test command
([[ foo ]] should be [ foo ])):
> [[ -x $part_util ]] || die "can't find part-util"
>possible bashism in ./usr/sbin/vhdpartx line 98 (alternative test command
([[ foo ]] should be [ foo ])):
> [[ -r $vhd && -r $lib ]] || die "can't find vhd or lib"
>possible bashism in ./usr/sbin/vhdpartx line 102 (alternative test command
([[ foo ]] should be [ foo ])):
> [[ -n "$add" ]] && add_mappings
>possible bashism in ./usr/sbin/vhdpartx line 103 (alternative test command
([[ foo ]] should be [ foo ])):
> [[ -n "$del" ]] && del_mappings
>possible bashism in ./usr/sbin/vhdpartx line 104 (alternative test command
([[ foo ]] should be [ foo ])):
> [[ -n "$list" ]] && list_mappings
Not using bash (or a Debian Policy conformant shell interpreter which
doesn't provide such an extra feature) as /bin/sh is likely to lead to
errors or unexpected behaviours.
You can find hints about how to fix bashisms at:
https://wiki.ubuntu.com/DashAsBinSh
Thank you,
Raphael Geissert
More information about the Pkg-xen-devel
mailing list