#11021: Fix "sage -info" and a bug when sourcing sage-env more than once
-----------------------------------------+----------------------------------
Reporter: jhpalmieri | Owner: leif
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7.1
Component: packages | Keywords: SPKG.txt SAGE.txt
-info BUILD sage-env sage-sage sage-spkg
Work_issues: | Upstream: N/A
Reviewer: Kelvin Li, Leif Leonhardy | Author: Leif Leonhardy,
Kelvin Li
Merged: | Dependencies:
-----------------------------------------+----------------------------------
Old description:
> One of the patches at #9960 did a lot of clean-up to the file `sage-
> spkg`: quoting environment variables, replacing tabs with spaces, etc.,
> also adding comments and TODOs. Since those changes were not related to
> the issue at #9960, I've split them off and put them here instead. The
> main change of any content is to look at the file `SPKG.txt` rather than
> `SAGE.txt` when the "`-info`" flag is passed so `sage-spkg` (through
> `sage -info ...`). Also, warnings and error messages are now redirected
> to `stderr`.
>
> The additional patch to `sage-spkg` is based on the v2 "clean-up" patch,
> fixing some more bugs, adding error checks, improving some messages (see
> comment below / commit message for some more details).
>
> Apparently support for `sage -info ...` was removed at some point (or
> never existed); the patch to `sage-sage` fixes that.
>
> The patch to `sage-env` fixes a bug caused or enabled by #10469, which
> through the patch to `sage-spkg` now becomes more visible and potentially
> worse.
>
> Apply
> 1. [attachment:trac_11021-sage-spkg-
> cleanup-v2-rebased_to_4.7.1.alpha4.patch]
> 1. [attachment:trac_11021-additional_changes_to_sage-spkg.scripts.patch]
> (somewhat optional, can be reviewed separately)
> 1. [attachment:trac_11021-support_and_document_sage_-info_in_sage-
> sage.scripts.patch]
> 1. [attachment:trac_11021-export_BUILD_in_sage-env.scripts.patch]
> to the '''scripts repo'''.
New description:
One of the patches at #9960 did a lot of clean-up to the file `sage-spkg`:
quoting environment variables, replacing tabs with spaces, etc., also
adding comments and TODOs. Since those changes were not related to the
issue at #9960, I've split them off and put them here instead. The main
change of any content is to look at the file `SPKG.txt` rather than
`SAGE.txt` when the "`-info`" flag is passed so `sage-spkg` (through `sage
-info ...`). Also, warnings and error messages are now redirected to
`stderr`.
The additional patch to `sage-spkg` is based on the v2 "clean-up" patch,
fixing some more bugs, adding error checks, improving some messages (see
comment below / commit message for some more details).
Apparently support for `sage -info ...` was removed at some point (or
never existed); the patch to `sage-sage` fixes that.
The patch to `sage-env` fixes a bug caused or enabled by #10469, which
through the patch to `sage-spkg` now becomes more visible and potentially
worse.
Apply
1. [attachment:trac_11021-sage-spkg-
cleanup-v2-rebased_to_4.7.1.alpha4.patch]
1. [attachment:trac_11021-additional_changes_to_sage-spkg.scripts.patch]
(somewhat optional, can be reviewed separately)
1. [attachment:trac_11021-support_and_document_sage_-info_in_sage-
sage.scripts.patch]
1. [attachment:trac_11021-export_BUILD_in_sage-env.scripts.patch]
to the '''scripts repo'''.
Apply
1. [attachment:trac_11021-fix_sage.misc.install_package.sagelib.patch]
to the '''Sage library'''.
--
Comment(by leif):
I've added another, necessary patch ''to the Sage library'', since
otherwise e.g. `sage -b` would break (just because to detect if an
optional spkg was installed the function finally called used `sage -f`
instead of `sage -i`).
P.S.: The fully qualified name of the function is of course^TM^
`sage.misc.package.install_package()`.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11021#comment:20>
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.