#13963: Failure running Sage when local/share/sage/ext doesn't exist
----------------------------------+-----------------------------------------
Reporter: jdemeyer | Owner: GeorgSWeber
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-5.7
Component: build | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Jeroen Demeyer | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Changes (by {'newvalue': u'Jeroen Demeyer', 'oldvalue': ''}):
* status: new => needs_review
* author: => Jeroen Demeyer
Old description:
> It seems that nothing really guarantees the existence of the directory
> `SAGE_EXTCODE` ({{{$SAGE_ROOT/local/share/sage/ext}}}) apart from the
> installers of some packages.
>
> When Sage is started when that directory doesn't exist:
> {{{
> [...lots of stuff...]
> /release/merger/sage-5.7.beta0/local/lib/python2.7/site-
> packages/sage/interfaces/all.py in <module>()
> 7
> 8 from expect import is_ExpectElement
> ----> 9 from gap import gap, gap_reset_workspace, gap_console,
> gap_version, set_gap_memory_pool_size, is_GapElement, Gap
> 10 from gap3 import gap3, gap3_console, gap3_version, Gap3
> 11 from genus2reduction import genus2reduction, Genus2reduction
>
> /release/merger/sage-5.7.beta0/local/lib/python2.7/site-
> packages/sage/interfaces/gap.py in <module>()
> 1457 # if the modification time of the gap link has changed (which
> signals
> 1458 # that gap has been somehow upgraded).
> -> 1459 if not os.path.exists(WORKSPACE) or os.path.getmtime(WORKSPACE) <
> os.path.getmtime(GAP_STAMP):
> 1460 #print "Automatically updating the cached Gap workspace:"
> 1461 #print WORKSPACE
>
> /release/merger/sage-5.7.beta0/local/lib/python/genericpath.py in
> getmtime(filename)
> 52 def getmtime(filename):
> 53 """Return the last modification time of a file, reported by
> os.stat()."""
> ---> 54 return os.stat(filename).st_mtime
> 55
> 56
> }}}
>
> This is a regression because conway_polynomials from #12205 '''runs Sage
> code at build time''' at a time when the existence of `SAGE_EXTCODE` is
> not guaranteed.
>
> See also #13123, which (indirectly) caused this issue.
New description:
It seems that nothing really guarantees the existence of the directory
`SAGE_EXTCODE` ({{{$SAGE_ROOT/local/share/sage/ext}}}) apart from the
installers of some packages.
When Sage is started when that directory doesn't exist:
{{{
[...lots of stuff...]
/release/merger/sage-5.7.beta0/local/lib/python2.7/site-
packages/sage/interfaces/all.py in <module>()
7
8 from expect import is_ExpectElement
----> 9 from gap import gap, gap_reset_workspace, gap_console,
gap_version, set_gap_memory_pool_size, is_GapElement, Gap
10 from gap3 import gap3, gap3_console, gap3_version, Gap3
11 from genus2reduction import genus2reduction, Genus2reduction
/release/merger/sage-5.7.beta0/local/lib/python2.7/site-
packages/sage/interfaces/gap.py in <module>()
1457 # if the modification time of the gap link has changed (which
signals
1458 # that gap has been somehow upgraded).
-> 1459 if not os.path.exists(WORKSPACE) or os.path.getmtime(WORKSPACE) <
os.path.getmtime(GAP_STAMP):
1460 #print "Automatically updating the cached Gap workspace:"
1461 #print WORKSPACE
/release/merger/sage-5.7.beta0/local/lib/python/genericpath.py in
getmtime(filename)
52 def getmtime(filename):
53 """Return the last modification time of a file, reported by
os.stat()."""
---> 54 return os.stat(filename).st_mtime
55
56
}}}
This is a regression because conway_polynomials from #12205 '''runs Sage
code at build time''' at a time when the existence of `SAGE_EXTCODE` is
not guaranteed.
The attached patch solves this problem in two ways:
* It only checks for and generates workspaces when actually starting GAP,
not when Sage is started.
* Instead of using `SAGE_EXTCODE` (which doesn't really make sense),
check the modification time of `$SAGE_LOCAL/bin/gap`.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13963#comment:3>
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.