#9960: require SAGE_CHECK to be "yes"
------------------------------+---------------------------------------------
Reporter: jhpalmieri | Owner: was
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.6.1
Component: user interface | Keywords:
Author: John Palmieri | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by leif):
Replying to [comment:8 jhpalmieri]:
> Replying to [comment:4 leif]:
> > The {{{SAGE_CHECK}}} issue (interpreting everything except "no" as
"yes") is AFAIK a historical relict; some spkgs might still run the test
suite from {{{spkg-install}}} if {{{SAGE_CHECK}}} is set and set to
anything but "no".
>
> I ran "grep" after unpacking all of the spkg's, and found SAGE_CHECK
used in cliquer and mpir. In both cases, it checks whether it's "yes".
Ok. Maybe we already corrected the others.
> > Replacing every occurrence of exit in sage-env by return should work
(then testing $? makes sense); I wonder why Sage is started even if sage-
env failed though. (I think there an exit 1 is missing.)
>
> When do you see Sage starting if sage-env fails?
My bad. I think this happened ''after'' I had replaced {{{exit}}} by
{{{return}}} in {{{sage-env}}} (screen buffer):
{{{
Error setting environment variables by running
/home/leif/Sage/sage-4.6.alpha1-final/local/bin/sage-env; possibly contact
sage-devel (see http://groups.google.com/group/sage-devel).
----------------------------------------------------------------------
| Sage Version 4.6.alpha1, Release Date: 2010-09-18 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
**********************************************************************
* *
* Warning: this is a prerelease version, and it may be unstable. *
* *
**********************************************************************
sage:
}}}
(But the same happens if {{{source}}} itself fails, e.g. because {{{sage-
env}}} isn't found, likewise when {{{SAGE_ROOT}}} contains spaces.)
But if the error message ever gets printed, Sage shouldn't start. We
currently have:
{{{
#!sh
. $SAGE_ROOT/local/bin/sage-env 1>/dev/null 2>/dev/null
if [ $? -ne 0 ]; then
echo "Error setting environment variables by running
$SAGE_ROOT/local/bin/sage-env; possibly cont
act sage-devel (see http://groups.google.com/group/sage-devel)."
fi
...
sage() {
sage_setup
sage-ipython "$@" -i
}
if [ $# -eq 0 ]; then
sage
exit $?
fi
}}}
> As far as changing sage-build to source sage-env, could that break
things? The other changes here are pretty inocuous.
I guess that's just an old flaw; calling it is of little use (will only
''check'' some things, but doesn't change the environment at all).
So give it a try and see what happens... ;-)
(It ''shouldn't''^TM^ break anything.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9960#comment:10>
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.