Hi Simon,

On Fri, Nov 27, 2009 at 11:22 PM, Simon King <simon.k...@nuigalway.ie> wrote:

<SNIP>

> Is it with intention (i.e., are people supposed to manually download
> the spkg first, and then do sage -i), or is it a bug?

First, let's discuss what is (to me at least) the expected behaviour
when one issues the following command:

{{{
sage -i <package>
}}}

If <package> is already installed, I expect Sage to report that and
quit trying to install <package>. In case I really want to install
<package> regardless of whether or not <package> is already installed
on my local Sage installation, then I should use the following
incantation:

{{{
sage -f <package>
}}}

The documentation for installing an spkg, as output by "sage -h |
-advanced", clearly documents the behaviour of the options "-i" and
"-f" so I think we need to document the specific values that <package>
can take.

Suppose for discussion that <package>-x.y.z.spkg is a Sage package,
whether that be in the standard, optional or experimental repository.
At the very least, one expects both of the options "-i" and "-f" to
consider the following as valid values:

(1) <package>-x.y.z, i.e. the name of the package plus the package's
version numbers.

(2) the full name <package>-x.y.z.spkg, i.e. the name of the package
in addition to the version numbers and the ".spkg" extension.

(3) <URL>/<package>-x.y.z.spkg, i.e. the full URL where the package is
hosted. This can be a URL on the Sage website or somewhere else.

(4) /path/to/<package>-x.y.z.spkg, i.e. the package is found somewhere
in your file system and you're giving an absolute or relative path to
the package.

At least with Sage 4.3.alpha0, almost all of the above four values are
valid. The exception is the issue you reported, i.e.
<URL>/<package>-x.y.z.spkg cannot be a URL other than that on the Sage
website. Incidentally, with Sage 4.3.alpha0 one can also do "sage -i
<package>", where <package> is just the package name without the
version numbers nor the ".spkg" extension.

See ticket #7544 [1] for a patch to fix the weird issue you reported above.

[1] http://trac.sagemath.org/sage_trac/ticket/7544

-- 
Regards
Minh Van Nguyen

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to