Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#12606 closed defect (fixed)

Fix sage --info <package>

Reported by: jdemeyer Owned by: leif
Priority: minor Milestone: sage-5.4
Component: scripts Keywords:
Cc: jhpalmieri Merged in: sage-5.4.beta0
Authors: Jeroen Demeyer Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

Doing

./sage --info mpir

should show the SPKG.txt of the mpir spkg.

Apply:

  1. 12606-sage-info.patch to the SAGE_ROOT repository.
  2. 12606_test_and_document_info.patch to the Sage library.

Attachments (2)

12606_test_and_document_info.patch (1.5 KB) - added by jdemeyer 7 years ago.
12606-sage-info.patch (3.3 KB) - added by jdemeyer 7 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 7 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Cc jhpalmieri added
  • Description modified (diff)
  • Status changed from new to needs_review

Changed 7 years ago by jdemeyer

Changed 7 years ago by jdemeyer

comment:2 Changed 7 years ago by jhpalmieri

  • Reviewers set to John Palmieri
  • Status changed from needs_review to positive_review

Looks good to me.

comment:3 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.3 to sage-5.4

comment:4 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.4.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:5 Changed 7 years ago by jdemeyer

Follow-up: #13497 (Disable sage --info test for bdists)

comment:6 follow-up: Changed 7 years ago by jhpalmieri

What would you think of a patch like this:

  • spkg/bin/sage

    diff --git a/spkg/bin/sage b/spkg/bin/sage
    a b install() { 
    919919        PKG_NAME=`echo "$PKG" | sed -e "s/\.spkg$//"`
    920920        PKG_NAME=`basename "$PKG_NAME"`
    921921
    922         "$SAGE_ROOT"/spkg/pipestatus \
    923             "sage-spkg $OPTINFO $OPTF $OPTS $OPTC '$PKG' 2>&1" \
    924             "(trap '' SIGINT; tee -a '$SAGE_ROOT/install.log' '$SAGE_LOGS/$PKG_NAME.log')"
     922       if [ -n $OPTINFO ]; then
     923            sage-spkg "$OPTINFO" "$PKG" 2>&1
     924       else
     925            "$SAGE_ROOT"/spkg/pipestatus \
     926               "sage-spkg $OPTINFO $OPTF $OPTS $OPTC '$PKG' 2>&1" \
     927               "(trap '' SIGINT; tee -a '$SAGE_ROOT/install.log' '$SAGE_LOGS/$PKG_NAME.log')"
     928       fi
    925929        # Do not try to install further packages if one failed
    926930        if [ $? -ne 0 ]; then
    927931            exit 1

(Or we can run sage-spkg --info "$PKG" for two cases in the case block.) Basically, I don't think that running sage --info foo should produce a file spkg/logs/foo.log.

comment:7 in reply to: ↑ 6 Changed 7 years ago by jdemeyer

Replying to jhpalmieri:

Basically, I don't think that running sage --info foo should produce a file spkg/logs/foo.log.

I agree, I already made a change like this for #5155.

Note: See TracTickets for help on using tickets.