#14414: runsnake command broken
-------------------------------------+-------------------------------------
Reporter: nbruin | Owner: tbd
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: performance | Resolution:
Keywords: | Merged in:
Authors: Frédéric Chapoton | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/ticket/14414 | f2654aea5ade94a5f43d87dc3b83906c57054545
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nbruin):
Replying to [comment:27 jdemeyer]:
> > If `$SAGE_LOCAL/bin/runsnake` exists but is not executable, an error
is also more appropriate
> I completely disagree with this, see previous comment.
OK, executable lookup indeed ignores non-executable files that occur
earlier in the path, so we should too. Strictly speaking the check should
be
{{{
sage_runsnake=os.path.join(os.eviron("SAGE_LOCAL"),"bin","runsnake")
if os.path.isfile(sage_runsnake) and os.access(sage_runsnake,os.X_OK):
...
}}}
to emulate normal PATH behaviour (where lookup skips directories with the
relevant name). Also, there's a comment on `os.access` that it tests
against real uid rather than effective gid. Sigh ... it's almost worth
running the risk of an improperly caught OSError.
--
Ticket URL: <http://trac.sagemath.org/ticket/14414#comment:28>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.