#5852: [with patch, needs review] the detection of SAGE_ROOT in $SAGE_ROOT/sage
script should expand symlinks recursively
----------------------+-----------------------------------------------------
 Reporter:  tornaria  |       Owner:  tornaria  
     Type:  defect    |      Status:  new       
 Priority:  major     |   Milestone:  sage-3.4.2
Component:  misc      |    Keywords:            
----------------------+-----------------------------------------------------
Changes (by tornaria):

  * owner:  tbd => tornaria
  * component:  algebra => misc
  * milestone:  => sage-3.4.2


Comment:

 Patching {{{$SAGE_ROOT/sage}}} with this:
 {{{
 --- sage-3.4/sage.orig  2009-04-22 01:45:48.000000000 -0300
 +++ sage-3.4/sage       2009-04-22 09:37:27.000000000 -0300
 @@ -14,6 +14,7 @@
  fi

  if [ "$SAGE_ROOT" = "....." ];  then
 +    SAGE_ROOT=`readlink -nf "$0" 2> /dev/null` || \
      SAGE_ROOT=`readlink -n "$0" 2> /dev/null` || \
      SAGE_ROOT=`realpath    "$0" 2> /dev/null` || \
      SAGE_ROOT="$0"
 }}}
 fixes the issue, since now {{{$SAGE_ROOT}}} is correct.

 According to mabshoff, {{{readlink -f}}} doesn't work on some BSD; that's
 why I left the {{{readlink -n}}} test in the second line, but this should
 of course be tested on those BSD to make sure it doesn't cause a
 regression.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5852#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to