#14377 closed enhancement (fixed)
Move spkg logs to logs/pkgs
Reported by:  jdemeyer  Owned by:  GeorgSWeber 

Priority:  blocker  Milestone:  sage5.9 
Component:  build  Keywords:  
Cc:  ohanar, ohanar  Merged in:  sage5.9.beta4 
Authors:  John Palmieri  Reviewers:  R. Andrew Ohana, Jeroen Demeyer 
Report Upstream:  N/A  Work issues:  
Branch:  Commit:  
Dependencies:  #14328, #14226  Stopgaps: 
Description
Save logs of package builds in logs/pkgs
instead of spkg/logs
.
Attachments (2)
Change History (14)
comment:1 Changed 8 years ago by
 Dependencies set to #14328
comment:2 Changed 8 years ago by
 Status changed from new to needs_review
comment:3 Changed 8 years ago by
 Reviewers set to R. Andrew Ohana
 Status changed from needs_review to positive_review
other than maybe removing the line in make distclean
, this looks good to me.
comment:4 Changed 8 years ago by
I think for the sake of upgrades, we should leave make distclean
as is.
comment:5 followup: ↓ 6 Changed 8 years ago by
Is this going to break anything? There are probably at least a few "help" questions where spgk/logs is listed as the place to look. I assume that no one wants it to be in both, of course.
Also, does make test
still work, though, and put a log somewhere? Is that still documented anywhere, or was the README the last place?
Just checking in both cases, I presume by default these are silly questions.
comment:6 in reply to: ↑ 5 Changed 8 years ago by
Replying to kcrisman:
Is this going to break anything? There are probably at least a few "help" questions where spgk/logs is listed as the place to look. I assume that no one wants it to be in both, of course.
If anything, logs/pkgs
should be easier to find than spkg/logs
. And also, when building fails, the error message is now a lot more clear.
Also, does
make test
still work, though, and put a log somewhere?
Yes, but see #14328 for this (it is unrelated to this ticket, which deals with logs of building packages).
Is that still documented anywhere
Not that I know.
comment:7 Changed 8 years ago by
 Dependencies changed from #14328 to #14328, #14226
 Reviewers changed from R. Andrew Ohana to R. Andrew Ohana, Jeroen Demeyer
Rebased to #14226 and added:

spkg/bin/sagespkg
diff git a/spkg/bin/sagespkg b/spkg/bin/sagespkg
a b 64 64 ************************************************************************ 65 65 Please email sagedevel (http://groups.google.com/group/sagedevel) 66 66 explaining the problem and including the relevant part of the log file 67 $SAGE_ ROOT/spkg/logs/$PKG_NAME.log67 $SAGE_LOGS/$PKG_NAME.log 68 68 Describe your computer, operating system, etc. 69 69 If you want to try to fix the problem yourself, *don't* just cd to 70 70 `pwd` and type '$2' or whatever is appropriate. 71 71 Instead, the following commands setup all environment variables 72 72 correctly and load a subshell for you to debug the error: 73 (cd '`pwd`' && '$SAGE_ROOT/sage'  sh)73 (cd '`pwd`' && '$SAGE_ROOT/sage' sh) 74 74 When you are done debugging, you can type "exit" to leave the subshell. 75 75 ************************************************************************ 76 76 MESSAGE
comment:8 Changed 8 years ago by
Oh, and now I've added this to the Sage library patch:

sage/env.py
diff git a/sage/env.py b/sage/env.py
a b 41 41 'SAGE_DATA' : '$SAGE_SHARE', 42 42 'SAGE_EXTCODE' : opj('$SAGE_SHARE', 'sage', 'ext'), 43 43 'SAGE_PACKAGES' : opj('$SAGE_ROOT', 'spkg'), 44 'SAGE_LOGS' : opj('$SAGE_ROOT', ' spkg', 'logs'),44 'SAGE_LOGS' : opj('$SAGE_ROOT', 'logs', 'pkgs'), 45 45 'SAGE_SPKG_INST' : opj('$SAGE_ROOT', 'spkg', 'installed'), 46 46 'SAGE_DOC' : opj('$SAGE_ROOT', 'devel', 'sage', 'doc'), 47 47 'DOT_SAGE' : opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage'),
comment:9 Changed 8 years ago by
 Priority changed from major to blocker
comment:10 Changed 8 years ago by
 Merged in set to sage5.9.beta4
 Resolution set to fixed
 Status changed from positive_review to closed
comment:11 Changed 8 years ago by
When upgrading, it would probably make sense to move old spkg build logs to the new folder, and afterwards create a symlink from spkg/logs
to logs/pkg/
.
comment:12 Changed 8 years ago by
The odd thing is that this disturbs filename completion $SAGE_ROOT/l...
; now one has to type three characters to disambiguate local
from logs
.
Also, why pkgs
, rather than spkgs
? Or log/[s]pkg[s]/
, which would be consistent (with e.g. /var/log/
)?
[EDIT: Ooops.]
Here is an untested patch to the root repo, along with a change to the documentation.