Jeroen Demeyer wrote:
> Hello,
> 
> What is the recommended way to check if the latest version of a given
> Sage package is installed? The function is_package_installed() only
> checks whether *some* version of the package is installed, which might
> not be the latest version.

The "recommended" way?! X)

Well, by the cool design, construct the version from the files
package-version.txt and probably checksums.ini in
build/pkgs/what_you_think_the_basename_in_sage_is/, and compare that to
what you may find in $SAGE_LOCAL/var/lib/sage/installed/ [sic].

To go triple-safe, compare the checksum(s) in one of the files mentioned
above to that of the upstream tarball (whose name you have to construct
as well from the files above) if present.

Simple, isn't it?

(As a "user", you may simply try './sage -i ...' and see if it says "...
already installed".)


Note that the "latest" version of any package is always exactly the one
hardcoded into the "unified repo" for any given Sage version.


-leif


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to