#13574: sage-spkg: check much earlier whether package is already installed
----------------------------------+-----------------------------------------
Reporter: jdemeyer | Owner: GeorgSWeber
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.5
Component: build | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Jeroen Demeyer | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Old description:
> The script `spkg/bin/sage-spkg` ''first'' downloads a package if it
> doesn't exist, and ''then'' checks whether it should be installed. If we
> want to give `bdists` without spkgs (#6822) a chance, we should reverse
> this order and check ''first'' whether the package is already installed.
>
> This is actually slightly more involved when users do
> {{{
> ./sage -i git
> }}}
> (i.e. a package name without version).
> To be able to handle this properly, we need to have a second check
> whether the package is already installed: after determining the version
> number (from the online packages) but before downloading the package.
>
> Results with the patch, starting from a binary without spkgs (created
> with #6822):
> {{{
> jdemeyer@sage:/release/sage-5.5.beta0-sage.math.washington.edu-x86_64-Linux$
> ./sage -i mpir
> Attempting to download package mpir
> >>> Checking online list of optional packages.
> [.]
> >>> Checking online list of experimental packages.
> [.]
> >>> Checking online list of standard packages.
> [.]
> >>> Found mpir-2.4.0.p6.
> Package mpir-2.4.0.p6 is already installed.
> Use 'sage -f
> http://www.sagemath.org/packages/standard/mpir-2.4.0.p6.spkg' to force a
> reinstallation.
> }}}
> {{{
> jdemeyer@sage:/release/sage-5.5.beta0-sage.math.washington.edu-x86_64-Linux$
> ./sage -i http://url/to/mpir-2.4.0.p6.spkg
> Package mpir-2.4.0.p6 is already installed.
> Use 'sage -f http://url/to/mpir-2.4.0.p6.spkg' to force a reinstallation.
> }}}
> {{{
> jdemeyer@sage:/release/sage-5.5.beta0-sage.math.washington.edu-x86_64-Linux$
> ./sage -i mpir-2.4.0.p6.spkg
> Package mpir-2.4.0.p6 is already installed.
> Use 'sage -f mpir-2.4.0.p6.spkg' to force a reinstallation.
> }}}
>
> '''Apply''' to `SAGE_ROOT`:
> [attachment:13574_spkg_already_installed.patch]
New description:
The script `spkg/bin/sage-spkg` ''first'' downloads a package if it
doesn't exist, and ''then'' checks whether it should be installed. If we
want to give `bdists` without spkgs (#6822) a chance, we should reverse
this order and check ''first'' whether the package is already installed.
This is actually slightly more involved when users do
{{{
./sage -i git
}}}
(i.e. a package name without version).
To be able to handle this properly, we need to have a second check whether
the package is already installed: after determining the version number
(from the online packages) but before downloading the package.
Results with the patch, starting from a binary without spkgs (created with
#6822):
{{{
jdemeyer@sage:/release/sage-5.5.beta0-sage.math.washington.edu-x86_64-Linux$
./sage -i mpir
Attempting to download package mpir
>>> Checking online list of optional packages.
[.]
>>> Checking online list of experimental packages.
[.]
>>> Checking online list of standard packages.
[.]
>>> Found mpir-2.4.0.p6.
Package mpir-2.4.0.p6 is already installed.
Use 'sage -f http://www.sagemath.org/packages/standard/mpir-2.4.0.p6.spkg'
to force a reinstallation.
}}}
{{{
jdemeyer@sage:/release/sage-5.5.beta0-sage.math.washington.edu-x86_64-Linux$
./sage -i http://url/to/mpir-2.4.0.p6.spkg
Package mpir-2.4.0.p6 is already installed.
Use 'sage -f http://url/to/mpir-2.4.0.p6.spkg' to force a reinstallation.
}}}
{{{
jdemeyer@sage:/release/sage-5.5.beta0-sage.math.washington.edu-x86_64-Linux$
./sage -i mpir-2.4.0.p6.spkg
Package mpir-2.4.0.p6 is already installed.
Use 'sage -f mpir-2.4.0.p6.spkg' to force a reinstallation.
}}}
'''Apply''' to `SAGE_ROOT`:
[attachment:13574_spkg_already_installed.patch] and
[attachment:trac_13574-part2.patch].
--
Comment (by jhpalmieri):
Here's a proposed patch to be applied on top of yours.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13574#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.