34b5d7d
diff -up src/bin/sage.orig src/bin/sage
34b5d7d
--- src/bin/sage.orig	2014-02-07 11:02:57.653623604 -0200
34b5d7d
+++ src/bin/sage	2014-02-07 11:08:54.765637279 -0200
86f823b
@@ -11,17 +11,14 @@ usage() {
86f823b
     echo "  file.<sage|py|spyx> -- run given .sage, .py or .spyx files"
86f823b
     echo "  -advanced           -- list all command line options"
86f823b
     echo "  -c <cmd>            -- Evaluates cmd as sage code"
86f823b
-    echo "  -experimental       -- list all experimental packages that can be installed"
86f823b
     echo "  -gap [...]          -- run Sage's Gap with given arguments"
86f823b
     echo "  -gp [...]           -- run Sage's PARI/GP calculator with given arguments"
86f823b
     echo "  -h, -?              -- print this help message"
86f823b
-    echo "  -i [packages]       -- install the given Sage packages"
86f823b
     echo "  -inotebook [...]    -- start the *insecure* Sage notebook"
86f823b
     echo "  -maxima [...]       -- run Sage's Maxima with given arguments"
86f823b
     echo "  -mwrank [...]       -- run Sage's mwrank with given arguments"
86f823b
     echo "  -n, -notebook [...] -- start the Sage notebook (options are the same"
86f823b
     echo "                         as for the notebook command in Sage)"
86f823b
-    echo "  -optional           -- list all optional packages that can be installed"
86f823b
     echo "  -python [...]       -- run the Python interpreter"
86f823b
     echo "  -R [...]            -- run Sage's R with given arguments"
86f823b
     echo "  -singular [...]     -- run Sage's singular with given arguments"
4c97a63
@@ -37,10 +34,6 @@ usage() {
fbc0e8d
     echo "                           --optional - controls which optional tests are run"
4c97a63
     echo "                           --sagenb - test all sagenb files"
fbc0e8d
     echo "                           --help - show all testing options"
34b5d7d
-    echo "  -upgrade [version]  -- download, build and install the given version. Here,"
34b5d7d
-    echo "                         'version' is a git branch or tag name. Useful values"
34b5d7d
-    echo "                         are 'master' (the currend development version, this"
34b5d7d
-    echo "                         is the default) or a version number like '5.13'."
86f823b
     echo "  -v, -version        -- print the Sage version"
86f823b
     exit 0
86f823b
 }
4c97a63
@@ -64,14 +57,14 @@ usage_advanced() {
fbc0e8d
     echo "  -root               -- print the Sage root directory"
fbc0e8d
     echo "  -gthread, -qthread, -q4thread, -wthread, -pylab"
fbc0e8d
     echo "                      -- pass the option through to ipython"
fbc0e8d
+    echo "  -testall [options]  -- test all source files, docs, and examples.  options"
fbc0e8d
+    echo "                         like -t"
fbc0e8d
     echo "  -v, -version        -- print the Sage version"
fbc0e8d
 
fbc0e8d
     echo
86f823b
     ####  1.......................26..................................................78
86f823b
     ####  |.....................--.|...................................................|
86f823b
     echo "Running the notebook:"
86f823b
-    echo "  -bn, -build-and-notebook [...] -- build the Sage library then start"
86f823b
-    echo "                         the Sage notebook"
86f823b
     echo "  -inotebook [...]    -- start the *insecure* Sage notebook"
86f823b
     echo "  -n, -notebook [...] -- start the Sage notebook (options are the same"
86f823b
     echo "                         as for the notebook command in Sage)"
34b5d7d
@@ -88,13 +81,9 @@ usage_advanced() {
fbc0e8d
     echo "  -gp [...]           -- run Sage's PARI/GP calculator with given arguments"
86f823b
     echo "  -ipython [...]      -- run Sage's IPython using the default environment (not"
86f823b
     echo "                         Sage), passing additional options to IPython"
86f823b
-    echo "  -kash [...]         -- run Sage's Kash with given arguments"
34b5d7d
-    command -v kash &>/dev/null || \
34b5d7d
     echo "                         (not installed currently, run sage -i kash)"
86f823b
     echo "  -lisp [...]         -- run Lisp interpreter included with Sage"
86f823b
     echo "  -M2 [...]           -- run Sage's Macaulay2 with given arguments"
34b5d7d
-    command -v M2 &>/dev/null || \
86f823b
-    echo "                         (not installed currently, run sage -i macaulay2)"
86f823b
     echo "  -maxima [...]       -- run Sage's Maxima with given arguments"
86f823b
     echo "  -mwrank [...]       -- run Sage's mwrank with given arguments"
86f823b
     echo "  -python [...]       -- run the Python interpreter"
34b5d7d
@@ -108,80 +97,10 @@ usage_advanced() {
86f823b
     echo
86f823b
     ####  1.......................26..................................................78
86f823b
     ####  |.....................--.|...................................................|
86f823b
-    echo "Installing packages and upgrading:"
86f823b
-    echo "  -experimental       -- list all experimental packages that can be installed"
86f823b
-    echo "  -f [opts] [packages]-- shortcut for -i -f: force build of the given Sage"
86f823b
-    echo "                         packages"
86f823b
-    echo "  -i [opts] [packages]-- install the given Sage packages (unless they are"
86f823b
-    echo "                         already installed); if no packages are given, print"
86f823b
-    echo "                         a list of all installed packages.  Options:"
86f823b
-    echo "                           -c -- run the packages' test suites"
86f823b
-    echo "                           -f -- force build: install the packages even"
86f823b
-    echo "                                 if they are already installed"
86f823b
-    echo "                           -s -- do not delete the spkg/build directories"
86f823b
-    echo "                                 after a successful build"
86f823b
-    echo "  -info [packages]    -- print the SPKG.txt of the given packages"
86f823b
-    echo "  -optional           -- list all optional packages that can be installed"
86f823b
-    echo "  -standard           -- list all standard packages that can be installed"
86f823b
-   #echo "  -update             -- download latest non-optional Sage packages (do not build them)"
86f823b
-   #echo "  -update-build       -- build and install all downloaded non-optional Sage packages"
34b5d7d
-    echo "  -upgrade [version]  -- download, build and install the given version. Here,"
34b5d7d
-    echo "                         'version' is a git branch or tag name. Useful values"
34b5d7d
-    echo "                         are 'master' (the currend development version, this"
34b5d7d
-    echo "                         is the default) or a version number like '5.13'."
86f823b
-
86f823b
-    echo
86f823b
-    ####  1.......................26..................................................78
86f823b
-    ####  |.....................--.|...................................................|
86f823b
-    echo "Building and testing the Sage library:"
86f823b
-    echo "  -b [branch]         -- build Sage library.  If branch is given, switch to"
86f823b
-    echo "                         branch in devel/sage-branch and build that branch"
86f823b
-    echo "  -sync-build         -- delete old code and other files in the Sage library"
86f823b
-    echo "                         that have already been deleted from devel/sage but"
86f823b
-    echo "                         remain in the build directory.  This is sometimes"
86f823b
-    echo "                         necessary because \`sage -b\` merely copies new or"
86f823b
-    echo "                         modified files to the target directory."
86f823b
-    echo "  -ba [branch]        -- same as -b and rebuild all Cython code"
86f823b
-    echo "  -ba-force [branch]  -- same as -ba, but don't query before rebuilding"
86f823b
-    echo "  -br [branch]        -- switch to, build, and run Sage given branch"
86f823b
-    echo "  -bt [...]           -- build and test, options like -t below"
86f823b
-    echo "  -btp <N> [...]      -- build and test parallel, options like -tp below"
86f823b
-    echo "  -btnew [...]        -- build and test modified files, options like -tnew"
d0a2caf
-    echo "  -fixdoctests <file.py> [output_file] [--long]"
d0a2caf
-    echo "                      -- writes a new version of file.py to output_file"
d0a2caf
-    echo "                         (defaults: to file.py.out) that will pass the doctests."
d0a2caf
-    echo "                         With the optional --long argument the long time tests"
d0a2caf
-    echo "                         are also checked."
d0a2caf
-    echo "                         A patch for the new file is printed to stdout."
d0a2caf
-    echo "  -startuptime [module] -- display how long each component of Sage takes to"
d0a2caf
-    echo "                         start up; optionally specify a module to get more"
d0a2caf
-    echo "                         details about that particular module"
fbc0e8d
-    echo "  -t [options] <--all|files|dir>"
fbc0e8d
-    echo "                      -- test examples in .py, .pyx, .sage, .tex or .rst files"
fbc0e8d
-    echo "                         selected options:"
fbc0e8d
-    echo "                           --long - include lines with the phrase 'long time'"
fbc0e8d
-    echo "                           --verbose - print debugging output during the test"
fbc0e8d
-    echo "                           --optional - controls which optional tests are run"
fbc0e8d
-    echo "                           --randorder[=seed] - randomize order of tests"
fbc0e8d
-    echo "                           --new - only test files modified since last commit"
fbc0e8d
-    echo "                           --initial - only show the first failure per block"
fbc0e8d
-    echo "                           --debug - drop into PDB after an unexpected error"
fbc0e8d
-    echo "                           --failed - only test files that failed last test"
4c97a63
-    echo "                           --sagenb - test all sagenb files"
fbc0e8d
-    echo "                           --help - show all testing options"
86f823b
-    echo "  -tp <N> [...]       -- like -t above, but tests in parallel using N threads"
86f823b
-    echo "                         with 0 interpreted as a sensible default"
86f823b
-    echo "  -testall [options]  -- test all source files, docs, and examples.  options"
86f823b
-    echo "                         like -t"
86f823b
-
86f823b
-    echo
86f823b
-    ####  1.......................26..................................................78
86f823b
-    ####  |.....................--.|...................................................|
86f823b
     echo "Documentation:"
86f823b
     echo "  -coverage <files>   -- give info about doctest coverage of files"
86f823b
     echo "  -coverageall        -- give summary info about doctest coverage of all"
d4a07df
     echo "                         files in the Sage library"
d4a07df
-    echo "  -docbuild [lang/]<document> <html|pdf|...> -- Build the Sage documentation"
d4a07df
     echo "  -search_src <string> -- search through all the Sage library code for string"
d4a07df
     echo "  -search_doc <string> -- search through the Sage documentation for string"
d4a07df
     echo "  -grep <string>      -- same as -search_src"
34b5d7d
@@ -201,17 +120,6 @@ usage_advanced() {
86f823b
     echo
86f823b
     ####  1.......................26..................................................78
86f823b
     ####  |.....................--.|...................................................|
86f823b
-    echo "Making Sage packages or distributions:"
86f823b
-    echo "  -bdist VER          -- build a binary distribution of Sage"
86f823b
-    echo "  -combinat [...]     -- run sage-combinat patch management script"
86f823b
-    echo "  -crap sage-ver.tar  -- detect suspicious garbage in sage source tarball"
86f823b
-    echo "  -pkg <dir>          -- create Sage package dir.spkg from a given directory"
86f823b
-    echo "  -pkg_nc <dir>       -- as -pkg, but do not compress the package"
34b5d7d
-    echo "  -sdist              -- build a source distribution of Sage"
86f823b
-
86f823b
-    echo
86f823b
-    ####  1.......................26..................................................78
86f823b
-    ####  |.....................--.|...................................................|
86f823b
     echo "Valgrind memory debugging:"
86f823b
     echo "  -cachegrind         -- run Sage using Valgrind's cachegrind tool.  The log"
86f823b
     echo "                         files are named sage-cachegrind.PID can be found in"
34b5d7d
@@ -225,9 +133,6 @@ usage_advanced() {
86f823b
     echo "  -memcheck           -- run Sage using Valgrind's memcheck tool.  The log"
86f823b
     echo "                         files are named sage-memcheck.PID can be found in"
86f823b
     echo "                         $DOT_SAGE"
86f823b
-    echo "  -omega              -- run Sage using Valgrind's omega tool.  The log"
86f823b
-    echo "                         files are named sage-omega.PID can be found in"
86f823b
-    echo "                         $DOT_SAGE"
86f823b
     echo "  -valgrind           -- this is an alias for -memcheck"
86f823b
     echo
86f823b
     echo "You can also use -- before a long option, e.g., 'sage --optional'."
34b5d7d
@@ -256,17 +161,6 @@ if [ "$1" = '-upgrade' -o "$1" = "--upgr
86f823b
 fi
86f823b
 
34b5d7d
 
34b5d7d
-# Source sage-env ($0 is the name of this "sage" script, so we can just
34b5d7d
-# append -env to that). We redirect stdout to stderr, which is safer
34b5d7d
-# for scripts.
34b5d7d
-. "$0-env" >&2
86f823b
-if [ $? -ne 0 ]; then
34b5d7d
-    echo >&2 "Error setting environment variables by sourcing '$0-env';"
86f823b
-    echo >&2 "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
86f823b
-    exit 1
86f823b
-fi
86f823b
-
86f823b
-
86f823b
 if [ $# -gt 0 ]; then
86f823b
   if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then
86f823b
      usage
34b5d7d
@@ -279,25 +173,11 @@ fi
86f823b
 
86f823b
 # Prepare for running Sage, either interactively or non-interactively.
86f823b
 sage_setup() {
86f823b
-    # Check that we're not in a source tarball which hasn't been built yet (#13561).
86f823b
-    if [ ! -d "$SAGE_LOCAL/lib/python/site-packages/sage" ]; then
86f823b
-        echo >&2 '************************************************************************'
86f823b
-        echo >&2 'It seems that you are attempting to run Sage from an unpacked source'
86f823b
-        echo >&2 'tarball, but you have not compiled it yet (or maybe the build has not'
86f823b
-        echo >&2 'finished). You should run `make` in the Sage root directory first.'
86f823b
-        echo >&2 'If you did not intend to build Sage from source, you should download'
86f823b
-        echo >&2 'a binary tarball instead. Read README.txt for more information.'
86f823b
-        echo >&2 '************************************************************************'
86f823b
-        exit 1
86f823b
-    fi
86f823b
-
86f823b
     # Display the startup banner
86f823b
     if [ "$SAGE_BANNER" != "no" ]; then
86f823b
         cat "$SAGE_LOCAL/bin/sage-banner"
86f823b
     fi
86f823b
 
fbc0e8d
-    maybe_sage_location
86f823b
-
86f823b
     if [ ! -d "$IPYTHONDIR" ]; then
86f823b
         # make sure that $DOT_SAGE exists so that ipython will happily
86f823b
         # create its config directories there.  If DOT_SAGE doesn't
34b5d7d
@@ -308,20 +188,6 @@ sage_setup() {
fbc0e8d
 }
fbc0e8d
 
d0a2caf
 
fbc0e8d
-# Check to see if the whole Sage install tree has moved.  If so,
fbc0e8d
-# change various hardcoded paths.  Skip this if we don't have write
fbc0e8d
-# access to $SAGE_LOCAL (e.g. when running as a different user) or
fbc0e8d
-# if Python and sage-location haven't been installed yet.
fbc0e8d
-maybe_sage_location()
fbc0e8d
-{
fbc0e8d
-    if [ -w "$SAGE_LOCAL" ]; then
fbc0e8d
-        if [ -x "$SAGE_LOCAL/bin/python" ] && [ -x "$SAGE_LOCAL/bin/sage-location" ]; then
fbc0e8d
-            sage-location || exit $?
fbc0e8d
-        fi
fbc0e8d
-    fi
fbc0e8d
-}
fbc0e8d
-
fbc0e8d
-
fbc0e8d
 # Start an interactive Sage session, this function never returns.
fbc0e8d
 interactive_sage() {
fbc0e8d
     sage_setup
34b5d7d
@@ -371,11 +237,6 @@ if [ "$1" = '-axiom' -o "$1" = '--axiom'
86f823b
     exec axiom "$@"
86f823b
 fi
86f823b
 
86f823b
-if [ "$1" = '-combinat' -o "$1" = '--combinat' ]; then
86f823b
-    shift
86f823b
-    exec sage-combinat "$@"
86f823b
-fi
86f823b
-
86f823b
 if [ "$1" = '-gap' -o "$1" = '--gap' ]; then
86f823b
     shift
34b5d7d
     exec gap "$@"
34b5d7d
@@ -388,7 +249,7 @@ fi
86f823b
 
86f823b
 if [ "$1" = '-singular' -o "$1" = '--singular' ]; then
86f823b
     shift
34b5d7d
-    exec singular "$@"
fbc0e8d
+    exec Singular "$@"
86f823b
 fi
86f823b
 
86f823b
 if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then
34b5d7d
@@ -416,16 +277,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ]
34b5d7d
     exec ecl "$@"
86f823b
 fi
86f823b
 
86f823b
-if [ "$1" = '-kash' -o "$1" = '--kash' ]; then
86f823b
-    shift
34b5d7d
-    exec kash "$@"
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-fixdoctests' -o "$1" = '--fixdoctests' ]; then
86f823b
-    shift
86f823b
-    exec sage-fixdoctests "$@"
34b5d7d
-fi
34b5d7d
-
86f823b
 if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
86f823b
     shift
34b5d7d
     exec maxima "$@"
34b5d7d
@@ -585,20 +436,6 @@ EOF
86f823b
 fi
86f823b
 
34b5d7d
 #####################################################################
86f823b
-# Test coverage of a module?
86f823b
-#####################################################################
86f823b
-
86f823b
-if [ "$1" = "-coverage" -o "$1" = "--coverage" ]; then
86f823b
-    shift
86f823b
-    exec sage-coverage "$@"
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = "-coverageall" -o "$1" = "--coverageall" ]; then
86f823b
-    shift
86f823b
-    exec sage-coverageall "$@"
86f823b
-fi
86f823b
-
34b5d7d
-#####################################################################
86f823b
 # File conversion
86f823b
 #####################################################################
34b5d7d
 
34b5d7d
@@ -613,36 +450,15 @@ if [ "$1" = '-rst2sws' -o "$1" = '--rst2
86f823b
 fi
86f823b
 
86f823b
 #####################################################################
86f823b
-# Crap
86f823b
-#####################################################################
86f823b
-
86f823b
-if [ "$1" = "-crap" -o "$1" = "--crap" ]; then
86f823b
-    shift
86f823b
-    exec sage-crap $@
86f823b
-fi
86f823b
-
86f823b
-#####################################################################
86f823b
 # Run Sage's versions of the standard Algebra/Geometry etc. software
86f823b
 #####################################################################
86f823b
 
86f823b
-build_sage() {
fbc0e8d
-    maybe_sage_location
86f823b
-    sage-build "$@" || exit $?
86f823b
-}
86f823b
-
86f823b
 if [ "$1" = "-notebook" -o "$1" = '--notebook' -o "$1" = '-n' ]; then
86f823b
     shift
86f823b
     sage-cleaner &>/dev/null &
86f823b
     exec sage-notebook "$@"
86f823b
 fi
86f823b
 
86f823b
-if [ "$1" = "-bn" -o "$1" = "--build-and-notebook" ]; then
86f823b
-    shift
86f823b
-    build_sage
86f823b
-    sage-cleaner &>/dev/null &
86f823b
-    exec sage-notebook "$@"
86f823b
-fi
86f823b
-
86f823b
 if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then
86f823b
     shift
86f823b
     sage-cleaner &>/dev/null &
34b5d7d
@@ -661,58 +477,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep
86f823b
    exit 0
86f823b
 fi
86f823b
 
86f823b
-if [ "$1" = '-b' ]; then
86f823b
-    shift
86f823b
-    time build_sage "$@"
86f823b
-    exit $?
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-br' -o "$1" = "--br" ]; then
86f823b
-    shift
86f823b
-    build_sage "$@"
86f823b
-    interactive_sage
86f823b
-fi
86f823b
-
34b5d7d
 if [ "$1" = '-r' ]; then
34b5d7d
    shift
34b5d7d
    interactive_sage
34b5d7d
 fi
34b5d7d
 
86f823b
-if [ "$1" = '-ba' ]; then
86f823b
-    shift
86f823b
-    echo " *** WARNING ***"
86f823b
-    echo " You are about to rebuild the entire Sage library."
86f823b
-    echo " This will take a significant amount of time."
86f823b
-    echo " (Use --ba-force instead of -ba to skip this prompt.)"
86f823b
-    echo -n " Do you want to proceed? [y/n] "
86f823b
-    read CHOICE
86f823b
-    while [ "$CHOICE" != "y" -a "$CHOICE" != "n" ]; do
86f823b
-        echo -n " Choose one of y, n: "
86f823b
-        read CHOICE
86f823b
-    done
86f823b
-    if [ $CHOICE = 'n' ]; then
86f823b
-        exit 0
86f823b
-    fi
86f823b
-    build_sage -b "$@"
86f823b
-    exit $?
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-ba-force' -o "$1" = '--ba-force' ]; then
86f823b
-    shift
86f823b
-    build_sage -b "$@"
86f823b
-    exit $?
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-sync-build' -o "$1" = '--sync-build' ]; then
86f823b
-    shift
86f823b
-    cd "$SAGE_ROOT"
86f823b
-    exec sage-sync-build.py "$@"
86f823b
-fi
86f823b
-
fbc0e8d
-if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" = '-tp' -o "$1" = '-btp' ]; then
fbc0e8d
-    if [ "$1" = '-bt' -o "$1" = '-btp' ]; then
fbc0e8d
-        build_sage
fbc0e8d
-    fi
fbc0e8d
+if [ "$1" = '-t' -o "$1" = '-tp' ]; then
fbc0e8d
     if [ ! -f  "$DOT_SAGE"/init.sage ]; then
fbc0e8d
         echo >&2 "init.sage does not exist ... creating"
fbc0e8d
         touch "$DOT_SAGE"/init.sage
34b5d7d
@@ -728,10 +498,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1"
fbc0e8d
     fi
86f823b
 fi
86f823b
 
86f823b
-if [ "$1" = '-tnew' -o "$1" = '-btnew' ]; then
fbc0e8d
-    if [ "$1" = '-btnew' ]; then
fbc0e8d
-        build_sage
fbc0e8d
-    fi
4c97a63
+if [ "$1" = '-tnew' ]; then
fbc0e8d
     shift
fbc0e8d
     SAGE_BANNER="no"
4c97a63
     sage_setup
34b5d7d
@@ -745,12 +512,6 @@ if [ "$1" = '-testall' -o "$1" = "--test
fbc0e8d
     exec sage-runtests -a "$@"
86f823b
 fi
86f823b
 
86f823b
-if [ "$1" = '-patchbot' -o "$1" = "--patchbot" ]; then
86f823b
-    shift
86f823b
-    cd "$SAGE_ROOT"
86f823b
-    exec "$SAGE_LOCAL/bin/patchbot/patchbot.py" "$@"
86f823b
-fi
86f823b
-
86f823b
 if [ "$1" = '-c' ]; then
86f823b
     shift
86f823b
     SAGE_BANNER="no"
34b5d7d
@@ -759,124 +520,6 @@ if [ "$1" = '-c' ]; then
86f823b
     exec sage-eval "$@"
86f823b
 fi
86f823b
 
86f823b
-install() {
fbc0e8d
-    maybe_sage_location
fbc0e8d
-
86f823b
-    mkdir -p "$SAGE_LOGS"
86f823b
-    for PKG in "$@"
86f823b
-    do
86f823b
-        # Check for options
86f823b
-        case "$PKG" in
86f823b
-            -f) OPTF="-f"
86f823b
-                continue;;
86f823b
-            -m) OPTS="-s"
86f823b
-                echo >&2 "Warning: the -m option is deprecated since Sage 5.0.  Use -s instead."
86f823b
-                continue;;
86f823b
-            -s) OPTS="-s"
86f823b
-                continue;;
86f823b
-            -c) OPTC="-c"
86f823b
-                continue;;
86f823b
-            --check) OPTC="-c"
86f823b
-                continue;;
86f823b
-            -info) OPTINFO="--info"
86f823b
-                continue;;
86f823b
-            --info) OPTINFO="--info"
86f823b
-                continue;;
86f823b
-            -*) echo >&2 "Error: unknown option '$PKG'"
86f823b
-                exit 2;;
86f823b
-        esac
86f823b
-
86f823b
-        PKG_NAME=`echo "$PKG" | sed -e "s/\.spkg$//"`
86f823b
-        PKG_NAME=`basename "$PKG_NAME"`
86f823b
-
34b5d7d
-        "$SAGE_ROOT"/build/pipestatus \
86f823b
-            "sage-spkg $OPTINFO $OPTF $OPTS $OPTC '$PKG' 2>&1" \
fbc0e8d
-            "(trap '' SIGINT; tee -a '$SAGE_ROOT/logs/install.log' '$SAGE_LOGS/$PKG_NAME.log')"
86f823b
-        # Do not try to install further packages if one failed
86f823b
-        if [ $? -ne 0 ]; then
86f823b
-            exit 1
86f823b
-        fi
86f823b
-    done
fbc0e8d
-    exit 0
86f823b
-}
86f823b
-
86f823b
-if [ "$1" = '-optional' -o "$1" = "--optional" ]; then
86f823b
-    exec sage-list-optional
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-experimental' -o "$1" = "--experimental" ]; then
86f823b
-    exec sage-list-experimental
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-standard' -o "$1" = "--standard" ]; then
86f823b
-    exec sage-list-standard
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-i' ]; then
86f823b
-    shift
86f823b
-    # If there are no further arguments, simply list all installed
86f823b
-    # packages.
86f823b
-    if [ $# -eq 0 ]; then
86f823b
-        exec sage-spkg
86f823b
-    fi
86f823b
-    install "$@"
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-f' ]; then
86f823b
-    shift
86f823b
-    # If there are no further arguments, simply list all installed
86f823b
-    # packages.
86f823b
-    if [ $# -eq 0 ]; then
86f823b
-        exec sage-spkg
86f823b
-    fi
86f823b
-    install -f "$@"
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-info' -o "$1" = '--info' ]; then
86f823b
-    shift
86f823b
-    for PKG in "$@"
86f823b
-    do
86f823b
-        sage-spkg --info "$PKG" || exit $?
86f823b
-    done
86f823b
-    exit 0
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-pkg' -o "$1" = '-spkg' -o "$1" = "--pkg" -o "$1" = "--spkg" ]; then
86f823b
-    shift
86f823b
-    exec sage-pkg "$@"
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-pkg_nc' -o "$1" = "--pkg_nc" ]; then
86f823b
-    shift
86f823b
-    exec sage-pkg -n "$@"
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-sdist' -o "$1" = "--sdist" ]; then
fbc0e8d
-    maybe_sage_location
34b5d7d
-    shift
34b5d7d
-    exec sage-sdist "$@"
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-rsyncdist' -o "$1" = "--rsyncdist" ]; then
86f823b
-    if [ $# -ne 2 ]; then
86f823b
-        echo >&2 "** MISSING VERSION NUMBER! **"
86f823b
-        exit 2
86f823b
-    fi
fbc0e8d
-    maybe_sage_location
86f823b
-    exec sage-rsyncdist $2
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = '-bdist' -o "$1" = "--bdist" ]; then
fbc0e8d
-    maybe_sage_location
86f823b
-    shift
34b5d7d
-    exec sage-bdist "$@"
86f823b
-fi
86f823b
-
86f823b
-if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then
86f823b
-    shift
4c97a63
-    exec python "$SAGE_DOC/common/builder.py" "$@"
86f823b
-fi
86f823b
-
86f823b
 if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
86f823b
     shift
86f823b
     sage_setup
34b5d7d
@@ -925,12 +568,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca
86f823b
     exec sage-callgrind "$@"
86f823b
 fi
86f823b
 
86f823b
-if [ "$1" = '-omega' -o "$1" = "--omega" ]; then
86f823b
-    shift
86f823b
-    sage_setup
86f823b
-    exec sage-omega "$@"
86f823b
-fi
86f823b
-
86f823b
 if [ "$1" = '-startuptime' -o "$1" = '--startuptime' ]; then
86f823b
     exec sage-startuptime.py "$@"
86f823b
 fi
34b5d7d
diff -up src/bin/sage-runtests.orig src/bin/sage-runtests
34b5d7d
--- src/bin/sage-runtests.orig	2014-02-07 11:09:24.776638428 -0200
34b5d7d
+++ src/bin/sage-runtests	2014-02-07 11:09:41.780639079 -0200
fbc0e8d
@@ -54,10 +54,6 @@ if __name__ == "__main__":
fbc0e8d
                       help="run doctests using Valgrind's cachegrind tool.  The log "
fbc0e8d
                          "files are named sage-cachegrind.PID and can be found in " +
fbc0e8d
                          os.path.join(os.environ["DOT_SAGE"], "valgrind"))
fbc0e8d
-    parser.add_option("--omega", action="store_true", default=False,
fbc0e8d
-                      help="run doctests using Valgrind's omega tool.  The log "
fbc0e8d
-                         "files are named sage-omega.PID and can be found in " +
fbc0e8d
-                         os.path.join(os.environ["DOT_SAGE"], "valgrind"))
fbc0e8d
 
fbc0e8d
     parser.add_option("-f", "--failed", action="store_true", default=False,
fbc0e8d
         help="doctest only those files that failed in the previous run")
34b5d7d
diff -up src/bin/sage-valgrind.orig src/bin/sage-valgrind
34b5d7d
--- src/bin/sage-valgrind.orig	2014-02-07 11:09:56.469639641 -0200
34b5d7d
+++ src/bin/sage-valgrind	2014-02-07 11:10:06.804640037 -0200
86f823b
@@ -11,7 +11,7 @@ fi
86f823b
 LOG="$DOT_SAGE"/valgrind/sage-memcheck.%p
86f823b
 echo "Log file is $LOG"
86f823b
 
86f823b
-MEMCHECK_FLAGS="--leak-resolution=high --log-file=$LOG --leak-check=full --num-callers=25 --suppressions=$SAGE_LOCAL/lib/valgrind/sage.supp "; export MEMCHECK_FLAGS
86f823b
+MEMCHECK_FLAGS="--leak-resolution=high --log-file=$LOG --leak-check=full --num-callers=25 "; export MEMCHECK_FLAGS
86f823b
 if [ "$SAGE_MEMCHECK_FLAGS" ]; then
86f823b
     echo "Overwriting memcheck flags with:"
86f823b
     echo $SAGE_MEMCHECK_FLAGS