id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
13963,Fix checking for and resetting GAP workspaces,jdemeyer,GeorgSWeber,"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.
If 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/gap.py in ()
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`.
'''Apply''': [attachment:13963_gap_stamp.patch]
'''spkg''': [http://boxen.math.washington.edu/home/jdemeyer/spkg/gap-4.5.7.p2.spkg] (diff: [attachment:gap-4.5.7.p2.diff])
'''optional spkg''': [http://boxen.math.washington.edu/home/jdemeyer/spkg/gap_packages-4.5.7.p0.spkg] (diff: [attachment:gap_packages-4.5.7.p0.diff])",defect,closed,critical,sage-5.7,build,fixed,,,sage-5.7.beta0,Jeroen Demeyer,Volker Braun,N/A,,,,,