[Python-apps-team] Bug#581122: mercurial-common: bashism in /bin/sh script

Javi Merino cibervicho at gmail.com
Tue May 11 08:44:19 UTC 2010


Hi, I think the attached patch fixes the bashism by creating a function
that returns a random number instead of relying on the $RANDOM magic
variable.

I'll try to get it accepted upstream.

Regards,
Javi (Vicho)

On 11/05/10 07:42, Raphael Geissert wrote:
> Package: mercurial-common
> Severity: minor
> Version: 1.5.1-2
> 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/share/doc/mercurial-common/examples/hgeditor line
>> 30 ($RANDOM):
>> HGTMP="${TMPDIR-/tmp}/hgeditor.$RANDOM.$RANDOM.$RANDOM.$$"
> 
> 
> Not using bash (or a Debian Policy compliant shell interpreter that doesn't
> provide such an extra feature) as /bin/sh is likely to lead to errors or
> unexpected behaviours. Please be aware that dash is now the default /bin/sh.
> 
> Hints about how to fix bashisms can be found at:
> https://wiki.ubuntu.com/DashAsBinSh
> 
> If you still don't know how to fix the bashisms don't hesitate to reply to
> this email, or tag the bug as 'help'.
> 
> Thank you,
> Raphael Geissert
> 
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hgeditor_fix_RANDOM_bashism.patch
Type: text/x-patch
Size: 625 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-apps-team/attachments/20100511/4ba9d2e3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/python-apps-team/attachments/20100511/4ba9d2e3/attachment.pgp>


More information about the Python-apps-team mailing list