Opened 4 years ago

Closed 4 years ago

#19470 closed enhancement (fixed)

Easier package update

Reported by: vbraun Owned by:
Priority: major Milestone: sage-6.10
Component: build Keywords:
Cc: fbissey, ncohen Merged in:
Authors: Volker Braun Reviewers: François Bissey
Report Upstream: N/A Work issues:
Branch: b9cc197 (Commits) Commit: b9cc197718ccdadd4e8e789c2a5999727af2f0bc
Dependencies: Stopgaps:

Description (last modified by vbraun)

Just run

$ sage --package update python2 2.7.10 --url=https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
Downloading tarball to /home/vbraun/Code/sage.git/upstream/python-2.7.10.tar.gz
[......................................................................]

Automatically updates checksums.ini, too.

Change History (16)

comment:1 Changed 4 years ago by vbraun

  • Branch set to u/vbraun/easier_package_update

comment:2 Changed 4 years ago by vbraun

  • Authors set to Volker Braun
  • Cc fbissey added
  • Commit set to 51ce428e9a60fa633b02d699bdffad4792a07e90
  • Component changed from PLEASE CHANGE to build
  • Description modified (diff)
  • Status changed from new to needs_review
  • Type changed from PLEASE CHANGE to enhancement

New commits:

51ce428Add a sage --package update command

comment:3 Changed 4 years ago by git

  • Commit changed from 51ce428e9a60fa633b02d699bdffad4792a07e90 to 342efad202fde3747443c2b6d433ca0efd179e06

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

342efadUpdate to Python 2.7.10

comment:4 Changed 4 years ago by git

  • Commit changed from 342efad202fde3747443c2b6d433ca0efd179e06 to 51ce428e9a60fa633b02d699bdffad4792a07e90

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

comment:5 Changed 4 years ago by ncohen

  • Cc ncohen added

comment:6 Changed 4 years ago by fbissey

It looks interesting but I am not sure how you are supposed to use it. A small tutorial or example (from the command line) wouldn't come amiss. Also can this be used from the tarball without building sage first or not?

comment:7 follow-up: Changed 4 years ago by vbraun

The ticket description has an example. What is unclear? You don't have to build Sage first, it'll use the system python.

comment:8 in reply to: ↑ 7 Changed 4 years ago by fbissey

Replying to vbraun:

The ticket description has an example. What is unclear? You don't have to build Sage first, it'll use the system python.

No sir, all clear, it is just a (not so early) morning disease. However it strikes me that a ticket description is not substitute for documentation. The only documentation available is

+        update: Update a package. This modifies the Sage sources. 
+    
+        $ sage-package update pari 2015 --url=http://localhost/pari/tarball.tgz

which I assume needs to be run from a sage shell.

Other than that lgtm.

comment:9 follow-up: Changed 4 years ago by vbraun

You don't need to run from a sage shell, you can also call $SAGE_ROOT/build/bin/sage-package directly. Do you want sage --package instead in the help?

comment:10 in reply to: ↑ 9 Changed 4 years ago by fbissey

Replying to vbraun:

You don't need to run from a sage shell, you can also call $SAGE_ROOT/build/bin/sage-package directly. Do you want sage --package instead in the help?

Yes I can do that I guess. I am in two minds. Do I think sage --package should be in the help. Yes I do, it's the right thing to do.

Does that give more work in sage-on-gentoo? Absolutely, one more thing I will have to chop.

Seriously, put it in the help.

comment:11 Changed 4 years ago by git

  • Commit changed from 51ce428e9a60fa633b02d699bdffad4792a07e90 to b9cc197718ccdadd4e8e789c2a5999727af2f0bc

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

b9cc197Use sage --package in the online help

comment:12 Changed 4 years ago by vbraun

Done

$ ./sage -package
sage-package
--------

The package script is used to manage third-party tarballs.

Usage:

* apropos: Find up to 5 package names that are close to the given name
  
  $ sage --package apropos python
  Did you mean: cython, ipython, python2, python3, patch?

* config: Print the configuration
  
  $ sage --package config
  Configuration:
    * log = info
    * interactive = True

* list: Print a list of all available packages
  
  $ sage --package list | sort
  4ti2
  arb
  atlas
  autotools
  [...]
  zn_poly

* name: Find the package name given a tarball filename
  
  $ sage --package name pari-2.8-1564-gdeac36e.tar.gz
  pari

* tarball: Find the tarball filename given a package name
  
  $ sage --package tarball pari
  pari-2.8-1564-gdeac36e.tar.gz

* update: Update a package. This modifies the Sage sources. 
  
  $ sage --package update pari 2015 --url=http://localhost/pari/tarball.tgz

comment:13 follow-up: Changed 4 years ago by vbraun

PS: presumably you just delete the build directory on gentoo? If you want a patch that hides all package management commandline options from sage if that directory is not there then that would be fine with me (though on a different ticket)

comment:14 in reply to: ↑ 13 Changed 4 years ago by fbissey

  • Status changed from needs_review to positive_review

Replying to vbraun:

PS: presumably you just delete the build directory on gentoo? If you want a patch that hides all package management commandline options from sage if that directory is not there then that would be fine with me (though on a different ticket)

I'll think about it. For the record I don't delete, I just don't do anything with it and of course it is not shipped. So the way you added the help here should be fine. I was thinking of sage --advanced I must say.

comment:15 Changed 4 years ago by vbraun

  • Reviewers set to François Bissey

comment:16 Changed 4 years ago by vbraun

  • Branch changed from u/vbraun/easier_package_update to b9cc197718ccdadd4e8e789c2a5999727af2f0bc
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.