#10431: cmdline.py doctest failures on fulvia (SunOS)
------------------------------+---------------------------------------------
   Reporter:  jdemeyer        |       Owner:  mvngu            
       Type:  defect          |      Status:  positive_review  
   Priority:  blocker         |   Milestone:  sage-4.6.1       
  Component:  doctest         |    Keywords:  scripts cmdline  
     Author:  Jeroen Demeyer  |    Upstream:  N/A              
   Reviewer:  Dan Drake       |      Merged:  sage-4.6.1.alpha3
Work_issues:                  |  
------------------------------+---------------------------------------------

Comment(by leif):

 Replying to [comment:1 jdemeyer]:
 > The line
 {{{
 readlink "$SAGE_ROOT/devel/sage" | sed "s/sage-//"
 }}}
 > from `sage-sage` can probably be replaced by:
 {{{
 cd "$SAGE_ROOT/devel/sage" && pwd -P | sed 's|.*/||; s|^sage-||'
 }}}
 > which is a lot uglier, but at least it works on Linux, OS X 10.4, SunOS
 5.10.

 Just for the record:

 `SAGE_ROOT/sage` also uses `realpath` if `readlink` is not available /
 fails.

 Don't know what systems (besides Linux) support that though.

 Since we rely on Bash, `cd ... && pwd -P ...` is of course more "portable"
 (i.e., generic, and actually POSIX), and likely to be a couple of
 femtoseconds faster (unless `cd` takes too long ;-) ).

 Note that there is a slight difference: `readlink` also reads dead links
 (deleted current Sage branches), while `cd` of course fails in that case.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10431#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
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