#11707: Remove `readlink -n` and `realpath` from $SAGE_ROOT/sage
------------------------+---------------------------------------------------
Reporter: jdemeyer | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-4.7.2
Component: scripts | Keywords: SAGE_ROOT
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
------------------------+---------------------------------------------------
Comment(by tornaria):
Replying to [ticket:11707 jdemeyer]:
> The file `$SAGE_ROOT/sage' contains the lines
> ...
> However, `readlink -n` certainly does not do what is intended:
> ...
Using `readlink -n` is definitely not "the right thing". However:
a. Using it makes a symlink work, ''provided'' it is a full path symlink
(and there are no recursive symlinks, etc)
b. One way to properly expand the symlink is using `readlink -f`. That was
proposed as a fix for #5852, it was applied, and later unapplied because
using fully canonicalized paths causes other issues with doctesting. It
just happens that using `readlink -n` is a middle-ground that works in
some cases but using `readlink -f` exposes the doctesting issue in some
common installs.
Thus, removing the use of `readlink -n` will break some common usage while
not fixing anything. Replacing it by `readlink -f` fixes the
canonicalization issue but will cause a regression by exposing a bug the
way doctesting detects library code (see #5852 comment 12).
----
Additional remark: note that using `readlink -f` is not completely
portable; neither is using `realpath`. Using both covers a majority of
systems but not all of them. A more portable solution was proposed in
#6146 but it doesn't make sense to push it until #5852 is resolved.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11707#comment:6>
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.