Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9553 closed defect (fixed)

Mention 'sage -ba-force' in the 'sage -ba' prompt

Reported by: Jeroen Demeyer Owned by: William Stein
Priority: minor Milestone: sage-4.5.3
Component: user interface Keywords:
Cc: Merged in: sage-4.5.3.rc0
Authors: Jeroen Demeyer Reviewers: William Stein, Mitesh Patel
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Mitesh Patel)

Running sage -ba from the shell gives

 *** WARNING ***
 You are about to rebuild the entire Sage library.
 This will take a significant amount of time.
 Do you want to proceed? [y/n]

Since this waits forever for user input, it is harder to use in non-interactive scripts. However, there is sage -ba-force, which does not wait. This ticket just adds a note about -ba-force to the prompt above.

Attachments (2)

9553.patch (742 bytes) - added by Jeroen Demeyer 12 years ago.
Apply this to the local/bin branch
trac_9553-use_the_baforce_message.patch (701 bytes) - added by Mitesh Patel 12 years ago.
"use" --> "Use". scripts repository. Apply only this patch.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 12 years ago by Jeroen Demeyer

While looking at this bug, I discovered the -ba-force option, which is exactly what I was looking for. So I propose a small patch to change the prompt to:

 *** WARNING ***
 You are about to rebuild the entire Sage library.
 This will take a significant amount of time.
 (use -ba-force instead of -ba to skip this prompt.)
 Do you want to proceed? [y/n]

comment:2 Changed 12 years ago by Jeroen Demeyer

Status: newneeds_review

Changed 12 years ago by Jeroen Demeyer

Attachment: 9553.patch added

Apply this to the local/bin branch

comment:3 Changed 12 years ago by William Stein

Excellent idea -- I hate interactive prompts, especially ones that it isn't obvious how to get around. That said, I think this line

echo " (use -ba-force instead of -ba to skip this prompt.)" 

should be

echo " (Use -ba-force instead of -ba to skip this prompt.)" 

comment:4 in reply to:  3 Changed 12 years ago by Jeroen Demeyer

Replying to was:

Excellent idea -- I hate interactive prompts, especially ones that it isn't obvious how to get around. That said, I think this line

As far as I'm concerned, we could even complete remove the prompt and make -ba act like -ba-force. I never quite understood the point of that prompt anyway.

Changed 12 years ago by Mitesh Patel

"use" --> "Use". scripts repository. Apply only this patch.

comment:5 Changed 12 years ago by Mitesh Patel

Milestone: sage-4.6
Reviewers: William Stein, Mitesh Patel
Status: needs_reviewpositive_review

I've attached an updated patch with William's suggested change.

To the release manager

Apply only trac_9553-use_the_baforce_message.patch, to the scripts repository.

comment:6 Changed 12 years ago by Mitesh Patel

Merged in: sage-4.5.3.rc0
Resolution: fixed
Status: positive_reviewclosed

comment:7 Changed 12 years ago by Mitesh Patel

Milestone: sage-4.6sage-4.5.3

comment:8 Changed 12 years ago by Mitesh Patel

Reviewers: William Stein, Mitesh PatelWilliam Stein, Mitesh Patel

comment:9 Changed 12 years ago by Leif Leonhardy

What a ticket! I'm not sure if two reviewers are enough to merge this... :D

Since despite its severity it now is, perhaps one should change the title and the description to reflect what the patch really does. ;-)

comment:10 Changed 12 years ago by Mitesh Patel

Description: modified (diff)
Summary: sage -ba (build all) waits for input, making it harder to use in scriptsMention 'sage -ba-force' in the 'sage -ba' prompt

comment:11 Changed 12 years ago by Leif Leonhardy

Thanks!

Note: See TracTickets for help on using tickets.