[Home]

Summary:ASTERISK-05733: [patch] bug in build_tools/make_svn_branch_name
Reporter:Luigi Rizzo (rizzo)Labels:
Date Opened:2005-11-29 06:20:48.000-0600Date Closed:2008-01-15 16:02:46.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) patch1
Description:build_tools/make_svn_branch_name invokes the 'test' command as
[ "foo" == "bar" ]

whereas the correct syntax for string comparison in test has only one =
I don't know if some linux variant accepts == as a synonym, but one manpage
i could find online

http://www.freebsd.org/cgi/man.cgi?query=test&apropos=0&sektion=0&manpath=Linux+Slackware+3.1&format=html

does not mention that as an option.
In any case, it is certainly a portability issue that needs to be fixed.
Patch attached.
Comments:By: Russell Bryant (russell) 2005-11-30 18:45:24.000-0600

This has been fixed in the 1.2 branch as well as the trunk.  It will be in the 1.2.1 release.  Thank you!

By: Russell Bryant (russell) 2005-11-30 18:47:25.000-0600

Just so that this information is here, it was identified in an email thread that on many linux systems, /bin/sh is a symlink to /bin/bash.  bash did not complain about this.  However, it caused the build to failed for FreeBSD users where /bin/sh was really /bin/sh and not a symlink to bash.

By: Digium Subversion (svnbot) 2008-01-15 16:02:45.000-0600

Repository: asterisk
Revision: 7246

U   trunk/build_tools/make_svn_branch_name

------------------------------------------------------------------------
r7246 | russell | 2008-01-15 16:02:44 -0600 (Tue, 15 Jan 2008) | 3 lines

use '=' instead of '==' for string comparisons.  /bin/bash is ok with this, but
/bin/sh is not.  (issue ASTERISK-5733)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=7246

By: Digium Subversion (svnbot) 2008-01-15 16:02:46.000-0600

Repository: asterisk
Revision: 7247

U   branches/1.2/build_tools/make_svn_branch_name

------------------------------------------------------------------------
r7247 | russell | 2008-01-15 16:02:45 -0600 (Tue, 15 Jan 2008) | 3 lines

use '=' instead of '==' for string comparisons.  /bin/bash is ok with this, but
/bin/sh is not.  (issue ASTERISK-5733)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=7247