Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#21082 closed enhancement (fixed)

Prompting about experimental packages: `sage -i -y`, `sage -i -n`

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-7.5
Component: build Keywords:
Cc: jdemeyer, embray, vbraun, kcrisman, dimpase, vdelecroix, novoselt, leif Merged in:
Authors: Erik Bray, Matthias Koeppe Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: 18ac798 (Commits, GitHub, GitLab) Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by mkoeppe)

This is a follow-up on:

  • #20884 closed defect (fixed): line buffering in sage-logger causes "hang" due to invisible prompt when installing experimental packages
  • #21539 positive_review enhancement: make V=0 should silence the build --- which solved the 'buffered prompting problem' by using /dev/tty

This ticket adds options -y ("yes"), -n ("no") that get rid of user prompting for non-interactive installs of experimental/old-style packages.

Also if there is no controlling terminal, then -n is implied for experimental packages and -y is implied for old-style optional packages. (On Linux, this situation can be tested by using `setsid` (for Mac OS X: see here) or by using ssh without the -t option.)

The ticket changes the exit status from 0 to 1 if the user declines to install the package. Previously, the system would record a successful installation in $SAGE_LOCAL/var/lib/sage/installed/.

Moreover, for experimental packages, sage -info no longer warns/prompts. Instead, the package type is simply printed. None of our packages is so dangerous that merely viewing the SPKG.txt will cause harm.

Change History (18)

comment:1 Changed 5 years ago by embray

I'm probably not going to bother.

Version 0, edited 5 years ago by embray (next)

comment:2 Changed 5 years ago by jdemeyer

  • Branch set to u/embray/ticket-20884-squashed
  • Commit set to 035e1d8e972d15f50229869da42fe669e9abc35e

New commits:

035e1d8A simplified approach to #20884

comment:3 Changed 5 years ago by mkoeppe

  • Description modified (diff)
  • Milestone changed from sage-7.4 to sage-7.5
  • Summary changed from Proper solution for warnings about experimental packages to Prompting about experimental packages: `sage -i -y`, `sage -i -n`

comment:4 Changed 5 years ago by mkoeppe

  • Branch changed from u/embray/ticket-20884-squashed to u/mkoeppe/ticket-20884-squashed

comment:5 Changed 5 years ago by mkoeppe

  • Authors set to Erik Bray, Matthias Koeppe
  • Commit changed from 035e1d8e972d15f50229869da42fe669e9abc35e to 928bc8ffcd81b72ef20a6373016f1a52b9a783de
  • Status changed from new to needs_review

The branch now on the ticket implements "-y".


New commits:

9d85ee1sage-logger: If no prefix, do not use sed
5df6cd9sage-spkg: Handle -y argument
928bc8fsage-spkg: Really handle -y argument

comment:6 Changed 5 years ago by git

  • Commit changed from 928bc8ffcd81b72ef20a6373016f1a52b9a783de to 4b75f624d3cfa9a8c8d45092d542329d7da22fa6

Branch pushed to git repo; I updated commit sha1. New commits:

b587aa4sage-spkg: Nonzero exit status if user says no to dangerous package
5f30555sage -info: Don't warn about experimental packages
9392c6asage -info: Print package type
16cbbf2sage -i: If -n provided, don't download old-style spkg
4b75f62sage -i: Handle -n and no-tty situation

comment:7 Changed 5 years ago by git

  • Commit changed from 4b75f624d3cfa9a8c8d45092d542329d7da22fa6 to 787b962cc08a85c2a6d51508214774eda4c6ffe7

Branch pushed to git repo; I updated commit sha1. New commits:

787b962Add 'sage -i' options -y, -n to help messages

comment:8 Changed 5 years ago by mkoeppe

  • Description modified (diff)

All features described are now implemented. Ready for review.

comment:9 Changed 5 years ago by mkoeppe

Andrey, referring to https://groups.google.com/forum/#!topic/sage-devel/5GXnV4tlMXw, could you check that this interface works for you?

comment:10 Changed 5 years ago by novoselt

Yes, I've started yesterday's version last night and it did go through experimental package installation. So I am for merging this although it would be good if someone else glanced at details.

comment:11 Changed 5 years ago by mkoeppe

  • Description modified (diff)

comment:12 follow-up: Changed 5 years ago by dimpase

In sage-logger you have + SED=cat and this should be SED="cat", no?

comment:13 Changed 5 years ago by dimpase

The documentation for -y should be more verbose about dangers of it, namely:

  • breaking the installation
  • accepting whatever licenses the package is under

comment:14 in reply to: ↑ 12 Changed 5 years ago by dimpase

Replying to dimpase:

In sage-logger you have + SED=cat and this should be SED="cat", no?

OK, please ignore this one.

comment:15 Changed 5 years ago by git

  • Commit changed from 787b962cc08a85c2a6d51508214774eda4c6ffe7 to 18ac798b02b66e6e3588d57e919544a9f0d443e1

Branch pushed to git repo; I updated commit sha1. New commits:

18ac798Warn about experimental packages in help string for -y

comment:16 Changed 5 years ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

OK

comment:17 Changed 5 years ago by vbraun

  • Branch changed from u/mkoeppe/ticket-20884-squashed to 18ac798b02b66e6e3588d57e919544a9f0d443e1
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:18 Changed 5 years ago by jdemeyer

  • Commit 18ac798b02b66e6e3588d57e919544a9f0d443e1 deleted

The mixture of spaces and TABs to indent is annoying: #21792. Please review!

Note: See TracTickets for help on using tickets.