#19004: Do not search old-style spkgs
-------------------------------------+-------------------------------------
Reporter: vbraun | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.9
Component: build | Resolution:
Keywords: | Merged in:
Authors: Volker Braun | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vbraun/do_not_search_old_style_spkgs|
7a1ebfcf2a977d7c2ec49fab5384a2d7eb178035
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jhpalmieri):
It's not ideal (http://files.sagemath.org/spkg/ is not the friendliest web
site), but it's basically good enough for me. I would suggest either of
the following changes:
{{{
#!diff
diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg
index a9f68a6..9c0c00c 100755
--- a/build/bin/sage-spkg
+++ b/build/bin/sage-spkg
@@ -57,6 +57,25 @@
# Avoid surprises with character ranges [a-z] in regular expressions
export LC_ALL=C
+usage()
+{
+cat <<EOF
+Usage: sage -i <options> <package name>
+
+If <package name> is a URL, download and install it. If it is a file
+name, install it. Otherwise, search Sage's list of packages (see 'sage
+--package list') for a matching package, and if a match is found,
+install it.
+
+Options:
+ -f: force install a package even if the same version is already
installed
+ -s: do not delete temporary build directory
+ -c: after installing, run the test suite for the spkg
+ -d: only download the package
+
+EOF
+}
+
# error_msg(header, command)
# This is for printing an error message if something went wrong.
# The first argument is the header to print, the second argument should
@@ -152,8 +171,8 @@ fi
# Handle special command-line options
##################################################################
if [ $# -eq 0 ]; then
- echo "Currently installed packages:"
- exec ls -1 "$SAGE_SPKG_INST"
+ usage
+ exit 0
fi
# Options have to come in a specific order,
}}}
or
{{{
#!diff
diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg
index a9f68a6..2ddd35b 100755
--- a/build/bin/sage-spkg
+++ b/build/bin/sage-spkg
@@ -153,7 +153,7 @@ fi
##################################################################
if [ $# -eq 0 ]; then
echo "Currently installed packages:"
- exec ls -1 "$SAGE_SPKG_INST"
+ exec sage-list-packages installed
fi
# Options have to come in a specific order,
}}}
I have a slight preference for the first, since `sage -i <pkg>` is not
very well documented. I also don't think that `sage -i` (with no
arguments) is documented anywhere, so maybe it's not a terrible idea to
change its behavior. Or we could use the second change and add a `-h` flag
for the usage message.
(My goal here is to not leave someone completely baffled if they want to
install an old-style package.)
Meanwhile, it would be good to reiterate on sage-devel that old-style
packages are on the way out, so people who maintain them should update to
new-style packages ASAP.
--
Ticket URL: <http://trac.sagemath.org/ticket/19004#comment:26>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.