[Parted-maintainers] Bug#298017: parted: bashisms in *.dpatch sh scripts

Sven Luther Sven Luther <sven.luther@wanadoo.fr>, 298017@bugs.debian.org
Fri, 4 Mar 2005 08:53:50 +0100


On Fri, Mar 04, 2005 at 03:04:30AM +0100, Nikolaus Schulz wrote:
> Package: parted
> Version: 1.6.11-8
> Severity: normal
> 
> Hi,
> 
> the patches in debian/patches are sh scripts. 
> Running "checkbashisms debian/patches/*.dpatch" detects this:
> 
> amiga.dpatch line 8: '. $(dirname $0)/DPATCH'
> chs.dpatch line 8: '. $(dirname $0)/DPATCH'
> devfs.dpatch line 9: '. $(dirname $0)/DPATCH'
> doc-package.dpatch line 7: '. $(dirname $0)/DPATCH'
> errors-to-stderr.dpatch line 7: '. $(dirname $0)/DPATCH'
> gcc-3.4.dpatch line 8: '. $(dirname $0)/DPATCH'
> hfs.dpatch line 9: '. $(dirname $0)/DPATCH'
> lvm2.dpatch line 7: '. $(dirname $0)/DPATCH'
> no-clobber.dpatch line 9: '. $(dirname $0)/DPATCH'
> prep.dpatch line 8: '. $(dirname $0)/DPATCH'
> reiserfs-libname.dpatch line 8: '. $(dirname $0)/DPATCH'
> s390.dpatch line 9: '. $(dirname $0)/DPATCH'
> sun_disklabel.dpatch line 8: '. $(dirname $0)/DPATCH'
> ubd.dpatch line 8: '. $(dirname $0)/DPATCH'

So what ? bash is part of base or build-essential, so it should be no problem.
And since this is only used during package build ...

Now, if you have a non-bashism workaround for the aboves, they are welcome.
maybe just doing . ./DPATCH ?

> devfs.dpatch line 30: '[len-1] == '
> devfs.dpatch line 31: '[len-3] == '
> hfs.dpatch line 1239: '[j].start_block == '

I would strongly doubt those, since they are part of the C diff, and thus
think your checkbashisms script is severly broken, please fix it.

Friendly,

Sven Luther