bugmonotone - Bugs: bug #26647, Debian Bug#530143: monotone:...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #26647: Debian Bug#530143: monotone: bashism in /bin/sh script

Submitter:  Ludovic Brenta <lbrenta>
Submitted:  Sat 23 May 2009 09:47:05 AM UTC
   
 
Category:  hook functions Severity:  2 - Minor
Item Group:  code cleanup Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
mtn version --full: 

Package: monotone
Severity: minor
Version: 0.43-3

Sun 19 Jul 2009 08:57:24 PM UTC, comment #1: 

Zack fixed this in a2e3901cf187fc830b5a08f67e3bcbf24abbafda.

Thomas Keller <tommyd>
Group administrator
Sat 23 May 2009 09:47:05 AM UTC, original submission:  

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/monotone/contrib/monotone-mail-notify.sh line 22
> ('function' is useless):
> function processFile() {
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 41 (function
> names should only contain [a-z0-9_]):
>     local parts=()
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 42 (function
> names should only contain [a-z0-9_]):
>     local files=()
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 43 (let ...):
>     let fIdx=0
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 44 (let ...):
>     let pIdx=0
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 46 (should be
> 'b = a'):
>     if [ "x" == "x$parents" ]
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 51 (bash
> arrays, H[0]):
>   files[0]=$plainDiff
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 52 (bash
> arrays, H[0]):
>   files[1]=$htmlDiff
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 53 (bash
> arrays, H[0]):
>   parts[0]=$partFile
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 68 (let ...):
>     let fIdx+=2
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 76 (let ...):
>     let pIdx+=1
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 81 (bash
> arrays, ${name[0|*|@]}):
>     for p in ${parts[@]}
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 91 (bash
> arrays, ${name[0|*|@]}):
>     for p in ${parts[@]}
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 96 (bash
> arrays, ${name[0|*|@]}):
>     for f in ${files[@]}
> possible bashism in
> ./usr/share/doc/monotone/contrib/monotone-mail-notify.sh line 105 (should
> be 'b = a'):
> if [ "x" == "x$(ls $BASE)" ]



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.
Please be aware that although bash is currently the default /bin/sh there was
a release goal for Lenny to make dash the default /bin/sh[1], and has been
proposed for squeeze as well[2].

If you want more information about dash as /bin/sh, you can read:
http://lists.debian.org/debian-release/2008/01/msg00189.html

For more information supporting this goal please refer to Debian Policy,
section 10.4, at:
http://www.debian.org/doc/debian-policy/ch-files.html#s-scripts

Hints about how to fix bashisms:
Sometimes these bugs are already fixed in Ubuntu, look at the PTS.
If not already fixed you can read:
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'.

[1]http://release.debian.org/lenny/goals.txt
[2]http://lists.debian.org/debian-release/2009/04/msg00133.html

Thank you,
Raphael Geissert

Ludovic Brenta <lbrenta>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tommyd (Posted a comment)
  • -email is unavailable- added by lbrenta (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-07-19 tommyd Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code