Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14377 closed enhancement (fixed)

Move spkg logs to logs/pkgs

Reported by: jdemeyer Owned by: GeorgSWeber
Priority: blocker Milestone: sage-5.9
Component: build Keywords:
Cc: ohanar, ohanar Merged in: sage-5.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)

trac_14377-root.patch (3.6 KB) - added by jdemeyer 8 years ago.
root repo
trac_14377-sagelib.patch (1.6 KB) - added by jhpalmieri 8 years ago.
documentation change (Sage library)

Download all attachments as: .zip

Change History (14)

comment:1 Changed 8 years ago by jdemeyer

  • Dependencies set to #14328

comment:2 Changed 8 years ago by jhpalmieri

  • Authors set to John Palmieri
  • Status changed from new to needs_review

Here is an untested patch to the root repo, along with a change to the documentation.

comment:3 Changed 8 years ago by ohanar

  • 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 jhpalmieri

I think for the sake of upgrades, we should leave make distclean as is.

comment:5 follow-up: Changed 8 years ago by 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.

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 jdemeyer

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.

Changed 8 years ago by jdemeyer

root repo

comment:7 Changed 8 years ago by jdemeyer

  • 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/sage-spkg

    diff --git a/spkg/bin/sage-spkg b/spkg/bin/sage-spkg
    
    a b  
    6464************************************************************************
    6565Please email sage-devel (http://groups.google.com/group/sage-devel)
    6666explaining the problem and including the relevant part of the log file
    67   $SAGE_ROOT/spkg/logs/$PKG_NAME.log
     67  $SAGE_LOGS/$PKG_NAME.log
    6868Describe your computer, operating system, etc.
    6969If you want to try to fix the problem yourself, *don't* just cd to
    7070`pwd` and type '$2' or whatever is appropriate.
    7171Instead, the following commands setup all environment variables
    7272correctly and load a subshell for you to debug the error:
    73   (cd '`pwd`' && '$SAGE_ROOT/sage' -sh)
     73  (cd '`pwd`' && '$SAGE_ROOT/sage' --sh)
    7474When you are done debugging, you can type "exit" to leave the subshell.
    7575************************************************************************
    7676MESSAGE

comment:8 Changed 8 years ago by jhpalmieri

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  
    4141        'SAGE_DATA'        : '$SAGE_SHARE',
    4242        'SAGE_EXTCODE'     : opj('$SAGE_SHARE', 'sage', 'ext'),
    4343        'SAGE_PACKAGES'    : opj('$SAGE_ROOT', 'spkg'),
    44         'SAGE_LOGS'        : opj('$SAGE_ROOT', 'spkg', 'logs'),
     44        'SAGE_LOGS'        : opj('$SAGE_ROOT', 'logs', 'pkgs'),
    4545        'SAGE_SPKG_INST'   : opj('$SAGE_ROOT', 'spkg', 'installed'),
    4646        'SAGE_DOC'         : opj('$SAGE_ROOT', 'devel', 'sage', 'doc'),
    4747        'DOT_SAGE'         : opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage'),
Last edited 8 years ago by jhpalmieri (previous) (diff)

Changed 8 years ago by jhpalmieri

documentation change (Sage library)

comment:9 Changed 8 years ago by jdemeyer

  • Priority changed from major to blocker

comment:10 Changed 8 years ago by jdemeyer

  • Merged in set to sage-5.9.beta4
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:11 Changed 8 years ago by leif

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 leif

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.]

Last edited 8 years ago by leif (previous) (diff)
Note: See TracTickets for help on using tickets.