Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-5792

2.10.0-M3 shell script wrappers do not resolve relative symlinks

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0-M3
    • Fix Version/s: Scala 2.10.0-M3
    • Component/s: Packaging
    • Labels:
    • Environment:

      Mac OS X 10.7.4.

      Description

      In MacPorts we install symlinks into $prefix/bin for all the shell scripts. The symlinks are relative, so `scala` is a symlink to ``../share/scala-2.10/bin/` instead of using an absolute symlink (makes it slightly more relocatable.) This works in 2.9 and breaks in 2.10. The 2.10 code works if one is cd'ed into the directory where the symlink resolved, but most times people are not cd'ed into $prefix/bin.

      1. This works:
        cd /tmp
        tar xvfz /opt/local/var/macports/distfiles/scala29/scala-2.9.2.tgz
        mkdir bin
        cd bin
        ln -sf ../scala-2.9.2/bin/scala .
        cd /
        /tmp/bin/scala
      1. This doesn't work:
        cd /tmp
        tar xvfz /opt/local/var/macports/distfiles/scala210/scala-2.10.0-M3.tgz
        mkdir bin
        cd bin
        ln -sf ../scala-2.10.0-M3/bin/scala .
        cd /
        /tmp/bin/scala

      Returns

      /tmp/bin/scala: line 15: cd: ../scala-2.10.0-M3/bin/..: No such file or directory
      Error: Could not find or load main class scala.tools.nsc.MainGenericRunner

      I'll change the symlinks in MacPorts to absolute.

        Attachments

          Activity

            People

            • Assignee:
              extempore Paul Phillips
              Reporter:
              blair Blair Zajac
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: