Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-7742

a bug in thisroot.sh (ROOT env setup) for bash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 6.02/10, 6.02/12, 6.04/02, 5.34/32, 5.34/34, 6.04/04, 6.04/06
    • Fix Version/s: 6.06/00, 6.02/14, 5.34/36, 6.04/10
    • Component/s: Other
    • Environment:

      bash with CDPATH defined

    • Platforms:
      x86_64-slc6-gcc48-opt
    • Development:

      Description

      The script bin/thisroot.sh would not be able to set up ROOT env under bash if CDPATH is defined. The following lines in bin/thisroot.sh

          thisroot=$(dirname ${BASH_ARGV[0]})
          ROOTSYS=$(cd ${thisroot}/..;pwd); export ROOTSYS

      will result in an incorrect ROOTSYS if $thisroot is a relative path. In fact, the value of ROOTSYS will be 2 sames path delimited by a space, something like:

      /afs/cern.ch/sw/lcg/app/releases/ROOT/6.04.02/x86_64-slc6-gcc48-opt/root /afs/cern.ch/sw/lcg/app/releases/ROOT/6.04.02/x86_64-slc6-gcc48-opt/root

      Redirecting the output of cd command to /dev/null could resolve this problem.

      Please help fix this problem.

      --Shuwei

        Attachments

          Activity

            People

            • Assignee:
              mato Pere Mato Vila
              Reporter:
              yesw Shuwei Ye
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: