# HG changeset patch
# User J. H. Palmieri
# Date 1293728555 -3600
# Node ID 9e4f7775bc7035e1fc90c1102264ea1f534642f2
# Parent cd55de2f84b552a15c14613e6c467147c37ec790
#9960: require SAGE_CHECK to be "yes" (rebased to Sage 4.6.1.rc0 by leif)
The patch also fixes some other flaws (now use return instead of exit
in sage-env, exit with 1 if sourcing sage-env failed).
Any output of sage-check-64 is redirected to /dev/null, to IMHO be
changed (perhaps by my reviewer patch; only stdout should be redi-
rected).
-leif
diff -r cd55de2f84b5 -r 9e4f7775bc70 sage-env
--- a/sage-env Fri Dec 24 16:24:40 2010 +0100
+++ b/sage-env Thu Dec 30 18:02:35 2010 +0100
@@ -42,7 +42,7 @@
echo "Error: You must set the SAGE_ROOT environment"
echo "variable or run this script from the SAGE_ROOT or "
echo "SAGE_ROOT/local/bin/ directory."
- exit 1
+ return 1
else
SAGE_ROOT="$GUESSED_SAGE_ROOT"
export SAGE_ROOT
@@ -58,7 +58,7 @@
echo "a bad value. You must correct it or erase it and"
echo "run this script from the SAGE_ROOT or"
echo "SAGE_ROOT/local/bin/ directory."
- exit 1
+ return 1
fi
fi
@@ -82,7 +82,7 @@
echo "It is currently \"$SAGE_ROOT\"."
echo "Please correct this by moving Sage (or renaming one or more directories) first."
echo "Exiting now..."
- exit 1
+ return 1
fi
@@ -222,7 +222,7 @@
fi
if [ "$1" = "-short" ]; then
- exit 0
+ return 0
fi
if [ -z "$RHOME" ]; then
@@ -281,13 +281,13 @@
if [ "$SAGE64" != "yes" -a "$SAGE64" != "no" ]; then
echo "The environment variable SAGE64 (=$SAGE64) must be either unset, yes or no."
- exit 1
+ return 1
fi
# In case SAGE64 has been set to yes before re-inject it into the environment
# This is only done on OSX and Solaris since those are the only real multi lib
# arches we support. Eventually Linux PPC on the PS3 might need to be added here
-source $SAGE_LOCAL/bin/sage-check-64 2> /dev/null
+source $SAGE_LOCAL/bin/sage-check-64 1> /dev/null 2> /dev/null
export SAGE64
if [ "$CXXFLAGS" = "" ]; then
diff -r cd55de2f84b5 -r 9e4f7775bc70 sage-sage
--- a/sage-sage Fri Dec 24 16:24:40 2010 +0100
+++ b/sage-sage Thu Dec 30 18:02:35 2010 +0100
@@ -225,6 +225,7 @@
if [ $? -ne 0 ]; then
echo >&2 "Error setting environment variables by running \"$SAGE_ROOT/local/bin/sage-env\";"
echo >&2 "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
+ exit 1
fi
# Sage startup script passes some funny options, which are
diff -r cd55de2f84b5 -r 9e4f7775bc70 sage-spkg
--- a/sage-spkg Fri Dec 24 16:24:40 2010 +0100
+++ b/sage-spkg Thu Dec 30 18:02:35 2010 +0100
@@ -368,7 +368,7 @@
echo "Successfully installed $PKG_NAME"
cd $BASEDIR
- if [ "$SAGE_CHECK" != "" -a -f spkg-check ]; then
+ if [ "x$SAGE_CHECK" = "xyes" -a -f spkg-check ]; then
echo "Running the test suite."
chmod +x spkg-check
./spkg-check