#27670 closed defect (fixed)

package install can print confusing error messages

Reported by: gh-BrentBaccala Owned by:
Priority: trivial Milestone: sage-8.8
Component: packages: optional Keywords: spkg, uninstall
Cc: embray, slelievre Merged in:
Authors: Brent Baccala Reviewers: Erik Bray
Report Upstream: N/A Work issues:
Branch: f0afed6 (Commits) Commit: f0afed6177a8f298d7aadd465a0e4ba137d27f27
Dependencies: Stopgaps:

Description (last modified by gh-BrentBaccala)

For example, while installing the kash3 package, the output includes the following lines:

usage: sage-spkg-uninstall [-h] [-v] [-k] spkg [sage_local]
sage-spkg-uninstall: error: argument spkg: invalid spkg_type value: 'kash3'

This is due to the uninstall script throwing incorrect error types. After applying this ticket's patch, the output reads:

usage: sage-spkg-uninstall [-h] [-v] [-k] spkg [sage_local]
sage-spkg-uninstall: error: argument spkg: 'kash3' is not a known spkg

Which is at least more sensible. kash3 is not known because it is an old-style package that didn't create a directory in build/pkgs.

Change History (7)

comment:1 Changed 12 months ago by gh-BrentBaccala

  • Authors set to Brent Baccala
  • Branch set to public/27607
  • Commit set to c50153a0ceee156c5a38475ba48aabd5571cecb9
  • Description modified (diff)
  • Status changed from new to needs_review

(Wrong branch - fixed below)

Last edited 12 months ago by gh-BrentBaccala (previous) (diff)

comment:2 Changed 12 months ago by gh-BrentBaccala

  • Branch changed from public/27607 to public/27670
  • Commit changed from c50153a0ceee156c5a38475ba48aabd5571cecb9 to f0afed6177a8f298d7aadd465a0e4ba137d27f27

comment:3 Changed 12 months ago by gh-BrentBaccala

  • Branch public/27670 deleted
  • Commit f0afed6177a8f298d7aadd465a0e4ba137d27f27 deleted

comment:4 Changed 12 months ago by gh-BrentBaccala

  • Branch set to public/27670
  • Commit set to f0afed6177a8f298d7aadd465a0e4ba137d27f27

New commits:

f0afed6Trac #27670: throw correct error types in uninstall script

comment:5 Changed 12 months ago by slelievre

  • Cc embray slelievre added
  • Keywords spkg uninstall added

comment:6 Changed 12 months ago by embray

  • Reviewers set to Erik Bray
  • Status changed from needs_review to positive_review

This fix makes sense in its own right so +1.

Support for old-style SPKGs is deprecated and should be removed completely.

The only reason it hasn't been completely removed is last time the question came up there was paralysis about what to do about one particularly large package that would need to be hosted somewhere if it were converted to a new-style SPKG.

In that case it was just a large database, and is so large in fact that I'm not convinced downloading the whole database is the right thing to do in most cases anyways. It should be wrapped in a little queryable web service hosted online somewhere (perhaps even sagemath.org). Someone just needs to do that. I don't think that one package is reason enough to hold up removal of old-style SPKG support though.

comment:7 Changed 11 months ago by vbraun

  • Branch changed from public/27670 to f0afed6177a8f298d7aadd465a0e4ba137d27f27
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.