Issue1978

classification
Title: Jython launcher shell script fails on OS/X 10.8 (Mountain Lion) with 'expr: syntax error'
Type: behaviour Severity: normal
Components: Installer Versions: Jython 2.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: otmarhumbel Nosy List: fwierzbicki, otmarhumbel, pjac, timgilbert, zyasoft
Priority: high Keywords:

Created on 2012-10-22.15:11:02 by timgilbert, last changed 2014-05-29.19:23:41 by zyasoft.

Messages
msg7482 (view) Author: Tim Gilbert (timgilbert) Date: 2012-10-22.15:11:01
Per this homebrew bug:

https://github.com/mxcl/homebrew/issues/13583

...this line in the launcher shell script fail with syntax errors from expr:

    if expr "$link" : '/' > /dev/null; then

Modifying the line to read as follows fixes the problem.

    if expr "$link" : '\/' > /dev/null; then

I have not been able to verify that this fix doesn't cause problems on other operating systems.
msg7547 (view) Author: Peter (pjac) Date: 2012-12-18.22:26:56
Confirming same bug also exists in Jython 2.7a2 under Mac OS X 10.8.2 "Mountain Lion). The suggested change appears to fix this:

<pre>
$ jython
expr: syntax error
Jython 2.7a2 (default:9c148a201233, May 24 2012, 15:49:00) 
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_37
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
</pre>

Giving:

<pre>
$ jython
Jython 2.7a2 (default:9c148a201233, May 24 2012, 15:49:00) 
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_37
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
</pre>
msg7763 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-25.21:51:28
Oti, any opinion on this?
msg8587 (view) Author: Jim Baker (zyasoft) Date: 2014-05-29.19:20:21
Still present in bin/jython - need to revisit

I would assume this backslashing is safe in general, but we would have to test to verify this assumption.
msg8588 (view) Author: Jim Baker (zyasoft) Date: 2014-05-29.19:23:41
On a side note: on Mavericks, there is no issue with the Jython launch script. So if this is a Mountain Lion only issue, it's going to be tough for us to test.
History
Date User Action Args
2014-05-29 19:23:41zyasoftsetmessages: + msg8588
2014-05-29 19:20:22zyasoftsetnosy: + zyasoft
messages: + msg8587
2013-02-25 21:51:28fwierzbickisetpriority: high
assignee: otmarhumbel
messages: + msg7763
nosy: + fwierzbicki, otmarhumbel
versions: + Jython 2.5, - 2.5.2
2012-12-18 22:26:57pjacsetnosy: + pjac
messages: + msg7547
2012-10-22 15:11:02timgilbertcreate