Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10011 closed defect (fixed)

"sage -upgrade" appears to hang when its output is tee'd

Reported by: leif Owned by: leif
Priority: minor Milestone: sage-4.6.1
Component: build Keywords: upgrade update prompt log redirect
Cc: jhpalmieri, mpatel, jdemeyer Merged in: sage-4.6.1.alpha0
Authors: Leif Leonhardy Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


user@host$ ./sage -upgrade | tee upgrade.log

appears to hang (without giving any output).

This is because sage-update prompts the user for confirmation, but doesn't flush the output.

The attached patch to sage-update (a Python script called by sage-upgrade) adds flushing various output and also contains some clean-up and corrections (to comments, docstrings, and the messages printed).

Attachments (1)

trac_10011-make_sage-update_flush_output-scripts_repo.patch (11.1 KB) - added by leif 11 years ago.
Apply to scripts repo. Based on Sage 4.6.alpha1.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by leif

Apply to scripts repo. Based on Sage 4.6.alpha1.

comment:1 Changed 11 years ago by leif

  • Status changed from new to needs_review

comment:2 Changed 11 years ago by leif

Just for the record:

leif@quadriga:~/Sage/sage-4.6.alpha1$ ./sage -upgrade | tee -a upgrade-tee-test-10011.1.log
Testing mirrors...

    [8 ]                   224 [ms]
    [11]                 259 [ms]
    [3 ]                381 [ms]
    [13]                 382 [ms]
    [21]            387 [ms]
    [19]               434 [ms]
    [12]                 529 [ms]
    [15]             806 [ms]
    [14]             833 [ms]
    [2 ]        851 [ms]
    [5 ]                   938 [ms]
    [20]                  967 [ms]
    [17]           1038 [ms]
    [4 ]       1451 [ms]
    [10]            1523 [ms]
    [7 ]               1581 [ms]
    [16]           1703 [ms]
    [6 ]                 2108 [ms]
    [18]     6327 [ms]
    [9 ]           11068 [ms]

Automatically selected server (
Downloading packages from ''.
Reading package lists.......... Done!
The following packages will be upgraded:

    cliquer-1.2.p6 examples-4.5.3 extcode-4.5.3 genus2reduction-0.3.p6
    iconv-1.13.1.p2 lcalc-20100428-1.23.p1 pari-2.3.5.p4
    polybori-0.6.4.p4 sage-4.5.3 sage_scripts-4.5.3

 ** WARNING: This is a source-based upgrade, which could take hours,
 ** fail, and render your Sage install useless!!

Do you want to continue [y/N]? n

Note that I did not run sage -downgrade! 8D

comment:3 follow-up: Changed 11 years ago by leif

  • Cc jdemeyer added

I know you don't like interactive scripts... ;-)

comment:4 in reply to: ↑ 3 Changed 11 years ago by jdemeyer

  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to positive_review

Replying to leif:

I know you don't like interactive scripts... ;-)

Very true.

The patch looks fine and fixes the problem mentioned in the ticket. I can't really be sure that it doesn't break anything, but positive_review anyway.

comment:5 Changed 11 years ago by jdemeyer

  • Merged in set to sage-4.6.1.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:6 Changed 11 years ago by mpatel

  • Milestone changed from sage-4.6 to sage-4.6.1
Note: See TracTickets for help on using tickets.