[sagemath] 01/03: Remove unneeded/broken options from the sage script, using a patch from sage-on-gentoo.

Tobias Hansen thansen at moszumanska.debian.org
Mon Dec 12 01:21:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository sagemath.

commit dcba7f28261d117e84a95693c4d27bf32018f172
Author: Tobias Hansen <thansen at debian.org>
Date:   Mon Dec 12 01:12:25 2016 +0000

    Remove unneeded/broken options from the sage script, using a patch from sage-on-gentoo.
---
 debian/patches/debian-cython-sys-path.patch |   2 +-
 debian/patches/debian-exec.patch            | 566 +++++++++++++++++++++++++++-
 debian/patches/debian-maxima.patch          |  11 +
 debian/patches/debian-scripts-dir.patch     |   6 +-
 4 files changed, 574 insertions(+), 11 deletions(-)

diff --git a/debian/patches/debian-cython-sys-path.patch b/debian/patches/debian-cython-sys-path.patch
index 937ecd9..adbf1d9 100644
--- a/debian/patches/debian-cython-sys-path.patch
+++ b/debian/patches/debian-cython-sys-path.patch
@@ -5,7 +5,7 @@ Origin: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/s
 
 --- a/sage/src/setup.py
 +++ b/sage/src/setup.py
-@@ -603,6 +603,7 @@
+@@ -604,6 +604,7 @@
          build_dir=SAGE_CYTHONIZED,
          force=force,
          aliases=aliases,
diff --git a/debian/patches/debian-exec.patch b/debian/patches/debian-exec.patch
index 24a844e..cfbf0cb 100644
--- a/debian/patches/debian-exec.patch
+++ b/debian/patches/debian-exec.patch
@@ -1,6 +1,242 @@
+Description: Patch the sage startup script
+ This patch removes options that do not work for us
+ and removes a check for if we are in a sage source directory.
+ It has only minor modifications from the sage-on-gentoo version.
+Origin: https://github.com/cschwan/sage-on-gentoo/blob/master/sci-mathematics/sage/files/sage-7.4-exec.patch
+Forwarded: not-needed
+
 --- a/sage/src/bin/sage
 +++ b/sage/src/bin/sage
-@@ -355,18 +355,6 @@
+@@ -13,20 +13,15 @@
+     echo "  file.[sage|py|spyx] -- run given .sage, .py or .spyx file"
+     echo "  -advanced           -- list all command line options"
+     echo "  -c <cmd>            -- Evaluates cmd as sage code"
+-    echo "  -experimental       -- list all experimental packages that can be installed"
+     echo "  -gap [...]          -- run Sage's Gap with given arguments"
+-    echo "  -gap3 [...]         -- run Sage's Gap3 with given arguments"
+     echo "  -gp [...]           -- run Sage's PARI/GP calculator with given arguments"
+     echo "  -h, -?              -- print this help message"
+-    echo "  -i [packages]       -- install the given Sage packages"
+-    echo "  -pip [...]          -- invoke pip, the Python package manager"
+     echo "  -inotebook [...]    -- start the *insecure* Sage notebook (deprecated)"
+     echo "  -maxima [...]       -- run Sage's Maxima with given arguments"
+     echo "  -mwrank [...]       -- run Sage's mwrank with given arguments"
+     echo "  --notebook=[...]    -- start the Sage notebook (valid options are"
+     echo "                         'default', 'sagenb', 'jupyter', and 'export')"
+     echo "  -n, --notebook      -- shortcut for --notebook=default"
+-    echo "  -optional           -- list all optional packages that can be installed"
+     echo "  -python [...]       -- run the Python interpreter"
+     echo "  -R [...]            -- run Sage's R with given arguments"
+     echo "  -singular [...]     -- run Sage's singular with given arguments"
+@@ -42,10 +37,6 @@
+     echo "                           --optional - controls which optional tests are run"
+     echo "                           --sagenb - test all sagenb files"
+     echo "                           --help - show all testing options"
+-    echo "  -upgrade [version]  -- download, build and install the given version. Here,"
+-    echo "                         'version' is a git branch or tag name. Useful values"
+-    echo "                         are 'master' (the current development version, this"
+-    echo "                         is the default) or a version number like '5.13'."
+     echo "  -v, -version        -- display Sage version information"
+     exit 0
+ }
+@@ -68,7 +59,6 @@
+     echo "                      -- pass the option through to ipython"
+     echo "  -v, -version        -- display Sage version information"
+     echo "  -dumpversion        -- print Sage version"
+-    echo "  -git-branch         -- print the current git branch"
+ 
+     echo
+     ####  1.......................26..................................................78
+@@ -78,8 +68,6 @@
+     echo "                         'default', 'sagenb', and 'jupyter'). See the output"
+     echo "                         of sage --notebook --help for more details and"
+     echo "                         examples of how to pass optional arguments"
+-    echo "  -bn, -build-and-notebook [...] -- build the Sage library then start"
+-    echo "                         the Sage notebook"
+     echo "  -inotebook [...]    -- start the *insecure* Sage notebook (deprecated)"
+     echo "  -n, -notebook [...] -- start the default Sage notebook (options are the"
+     echo "                         same as for the notebook command in Sage).  See the"
+@@ -93,7 +81,6 @@
+     echo "  -cython [...]       -- run Cython with given arguments"
+     echo "  -ecl [...]          -- run Common Lisp"
+     echo "  -gap [...]          -- run Sage's Gap with given arguments"
+-    echo "  -gap3 [...]         -- run Sage's Gap3 with given arguments"
+     echo "  -gdb                -- run Sage under the control of gdb"
+     echo "  -gp [...]           -- run Sage's PARI/GP calculator with given arguments"
+     echo "  -ipython [...]      -- run Sage's IPython using the default environment (not"
+@@ -112,7 +99,6 @@
+     echo "                         (not installed currently, run sage -i polymake)"
+     echo "  -python [...]       -- run the Python interpreter"
+     echo "  -R [...]            -- run Sage's R with given arguments"
+-    echo "  -scons [...]        -- run Sage's scons"
+     echo "  -sh [...]           -- run \$SHELL ($SHELL) with Sage environment variables"
+     echo "  -singular [...]     -- run Sage's singular with given arguments"
+     echo "  -sqlite3 [...]      -- run Sage's sqlite3 with given arguments"
+@@ -121,49 +107,7 @@
+     echo
+     ####  1.......................26..................................................78
+     ####  |.....................--.|...................................................|
+-    echo "Installing packages and upgrading:"
+-    echo "  -package [args]     -- call the new package manager with given arguments."
+-    echo "                         Run without arguments for package-specific help."
+-    echo "  -experimental       -- list all experimental packages that can be installed"
+-    echo "  -f [opts] [packages]-- shortcut for -i -f: force build of the given Sage"
+-    echo "                         packages"
+-    echo "  -i [opts] [packages]-- install the given Sage packages.  Options:"
+-    echo "                           -c -- run the packages' test suites"
+-    echo "                           -d -- only download, do not install packages"
+-    echo "                           -f -- force build: install the packages even"
+-    echo "                                 if they are already installed"
+-    echo "                           -s -- do not delete the temporary build directories"
+-    echo "                                 after a successful build"
+-    echo "  -p [opts] [packages]-- install the given Sage packages, without dependency"
+-    echo "                         checking and with support for old-style spkgs."
+-    echo "                         Options are -c, -d and -s with the same meaning as"
+-    echo "                         for the -i command"
+-    echo "  -info [packages]    -- print the SPKG.txt of the given packages"
+-    echo "  --location          -- if needed, fix paths to make Sage relocatable"
+-    echo "  -optional           -- list all optional packages that can be installed"
+-    echo "  -standard           -- list all standard packages that can be installed"
+-    echo "  -installed          -- list all installed packages"
+-    echo "  -upgrade [version]  -- download, build and install the given version. Here,"
+-    echo "                         'version' is a git branch or tag name. Useful values"
+-    echo "                         are 'master' (the current development version, this"
+-    echo "                         is the default) or a version number like '5.13'."
+-    echo "  -pip [...]          -- invoke pip, the Python package manager"
+-
+-    echo
+-    ####  1.......................26..................................................78
+-    ####  |.....................--.|...................................................|
+-    echo "Building and testing the Sage library:"
+-    echo "  -b                  -- build Sage library."
+-    echo "  -ba                 -- same as -b and rebuild all Cython code"
+-    echo "  -ba-force           -- same as -ba, but don't query before rebuilding"
+-    echo "  -br                 -- build and run Sage"
+-    echo "  -bt [...]           -- build and test, options like -t below"
+-    echo "  -btp <N> [...]      -- build and test parallel, options like -tp below"
+-    echo "  -btnew [...]        -- build and test modified files, options like -tnew"
+-    echo "  -fixdoctests <file.py> [output_file] [--long]"
+-    echo "                      -- replace failing doctests with the actual output. With"
+-    echo "                         optional output_file: redirect there. With the --long"
+-    echo "                         option: include #long time tests."
++    echo "Testing the Sage library:"
+     echo "  -startuptime [module] -- display how long each component of Sage takes to"
+     echo "                         start up; optionally specify a module to get more"
+     echo "                         details about that particular module"
+@@ -172,9 +116,7 @@
+     echo "                         selected options:"
+     echo "                           --long - include lines with the phrase 'long time'"
+     echo "                           --verbose - print debugging output during the test"
+-    echo "                           --optional - controls which optional tests are run"
+     echo "                           --randorder[=seed] - randomize order of tests"
+-    echo "                           --new - only test files modified since last commit"
+     echo "                           --initial - only show the first failure per block"
+     echo "                           --debug - drop into PDB after an unexpected error"
+     echo "                           --failed - only test files that failed last test"
+@@ -190,10 +132,6 @@
+     ####  1.......................26..................................................78
+     ####  |.....................--.|...................................................|
+     echo "Documentation:"
+-    echo "  -coverage <files>   -- give info about doctest coverage of files"
+-    echo "  -coverageall        -- give summary info about doctest coverage of all"
+-    echo "                         files in the Sage library"
+-    echo "  -docbuild [lang/]<document> <html|pdf|...> -- Build the Sage documentation"
+     echo "  -search_src <string> -- search through all the Sage library code for string"
+     echo "  -search_doc <string> -- search through the Sage documentation for string"
+     echo "  -grep <string>      -- same as -search_src"
+@@ -213,16 +151,6 @@
+     echo
+     ####  1.......................26..................................................78
+     ####  |.....................--.|...................................................|
+-    echo "Making Sage packages or distributions:"
+-    echo "  -sdist              -- build a source distribution of Sage"
+-    echo "  -pkg <dir>          -- create Sage package dir.spkg from a given directory"
+-    echo "  -pkg_nc <dir>       -- as -pkg, but do not compress the package"
+-    echo "  -fix-pkg-checksums  -- fix the checksums from build/pkgs directories from "
+-    echo "                         the packages located in upstream/"
+-
+-    echo
+-    ####  1.......................26..................................................78
+-    ####  |.....................--.|...................................................|
+     echo "Valgrind memory debugging:"
+     echo "  -cachegrind         -- run Sage using Valgrind's cachegrind tool.  The log"
+     echo "                         files are named sage-cachegrind.PID can be found in"
+@@ -263,74 +191,6 @@
+     exit $status
+ fi
+ 
+-# Check for '--patchbot' before sourcing sage-env: patchbot needs
+-# an unclobbered environment before testing unsafe tickets.
+-if [ "$1" = '-patchbot' -o "$1" = "--patchbot" ]; then
+-    shift
+-    cd "$SAGE_ROOT"
+-    exec local/bin/patchbot/patchbot.py "$@"
+-fi
+-
+-# Check for '--upgrade' before sourcing sage-env: the top-level "make"
+-# should be run outside of the Sage shell, see #15517.
+-if [ "$1" = '-upgrade' -o "$1" = "--upgrade" ]; then
+-    shift
+-    cd "$SAGE_ROOT"
+-    exec local/bin/sage-upgrade "$@"
+-fi
+-
+-# Check for '-i' before sourcing sage-env: running "make"
+-# should be run outside of the Sage shell.
+-if [ "$1" = '-f' ]; then
+-    # -f is an alias for -i -f
+-    set -- -i "$@"
+-fi
+-
+-if [ "$1" = '-i' ]; then
+-    shift
+-    if [ -z "$MAKE" ]; then
+-        MAKE="make"
+-    fi
+-
+-    set -e
+-
+-    cd "$SAGE_ROOT"
+-
+-    # First of all, make sure that the toolchain is up-to-date
+-    # (which is a dependency of every package)
+-    ./sage --location
+-    $MAKE all-toolchain
+-    echo
+-
+-    INSTALL_OPTIONS=""  # Options to sage-spkg
+-    for PKG in "$@"
+-    do
+-        case "$PKG" in
+-            -info|--info)
+-                echo >&2 "Error: 'sage -i $PKG <package>' is no longer supported, use 'sage --info <package>' instead."
+-                exit 2;;
+-            -f) FORCE_INSTALL=yes;;
+-            -*) INSTALL_OPTIONS="$INSTALL_OPTIONS $PKG";;
+-            *)
+-                # First check that $PKG is actually a Makefile target
+-                if ! grep "^$PKG: " build/make/Makefile >/dev/null; then
+-                    echo >&2 "Error: package '$PKG' not found"
+-                    echo >&2 "Assuming it is an old-style package... (this is deprecated: use -p instead of -i to install old-style packages)"
+-                    echo >&2
+-                    sleep 5
+-                    ./sage -p $INSTALL_OPTIONS "$PKG"
+-                else
+-                    if [ x$FORCE_INSTALL = xyes ]; then
+-                        $MAKE "$PKG-clean"
+-                    fi
+-                    $MAKE SAGE_SPKG="sage-spkg $INSTALL_OPTIONS" "$PKG"
+-                fi;;
+-        esac
+-    done
+-    exit 0
+-fi
+-
+-
+ #####################################################################
+ # Source sage-env ($0 is the name of this "sage" script, so we can just
+ # append -env to that). We redirect stdout to stderr, which is safer
+@@ -355,47 +215,13 @@
  
  # Prepare for running Sage, either interactively or non-interactively.
  sage_setup() {
@@ -14,17 +250,333 @@
 -        echo >&2 'a binary tarball instead. Read README.txt for more information.'
 -        echo >&2 '************************************************************************'
 -        exit 1
++    if [ "$SAGE_BANNER" != "no" ]; then
++        cat "/usr/share/sage/bin/sage-banner"
+     fi
+ 
+-    # Display the startup banner (unless SAGE_BANNER is explictly "no")
+-    sage_banner
+-
+-    maybe_sage_location
+-
+-    if [ ! -d "$IPYTHONDIR" ]; then
+-        # make sure that $DOT_SAGE exists so that ipython will happily
+-        # create its config directories there.  If DOT_SAGE doesn't
+-        # exist, ipython complains.
+-        mkdir -p "$DOT_SAGE"
 -    fi
+     sage-cleaner &>/dev/null &
+ }
+ 
+-
+-# Check to see if the whole Sage install tree has moved.  If so,
+-# change various hardcoded paths.  Skip this if we don't have write
+-# access to $SAGE_LOCAL (e.g. when running as a different user) or
+-# if Python and sage-location haven't been installed yet.
+-maybe_sage_location()
+-{
+-    if [ -w "$SAGE_LOCAL" ]; then
+-        if [ -x "$SAGE_LOCAL/bin/python" ] && [ -x "$SAGE_LOCAL/bin/sage-location" ]; then
+-            sage-location || exit $?
+-        fi
+-    fi
+-}
+-
 -
-     # Display the startup banner (unless SAGE_BANNER is explictly "no")
-     sage_banner
+ # Start an interactive Sage session, this function never returns.
+ interactive_sage() {
+     sage_setup
+@@ -455,11 +281,6 @@
+     exec gap "$@"
+ fi
  
-@@ -512,7 +500,7 @@
+-if [ "$1" = '-gap3' -o "$1" = '--gap3' ]; then
+-    shift
+-    exec gap3 "$@"
+-fi
+-
+ if [ "$1" = '-gp' -o "$1" = '--gp' ]; then
+     shift
+     exec gp "$@"
+@@ -505,11 +326,6 @@
+     exec kash "$@"
+ fi
  
+-if [ "$1" = '-fixdoctests' -o "$1" = '--fixdoctests' ]; then
+-    shift
+-    exec sage-fixdoctests "$@"
+-fi
+-
  if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
      shift
--    exec maxima "$@"
-+    exec maxima-sage "$@"
+     exec maxima "$@"
+@@ -525,21 +341,6 @@
+     exec M2 "$@"
+ fi
+ 
+-if [ "$1" = '-scons' -o "$1" = '--scons' ]; then
+-    shift
+-    exec scons "$@"
+-fi
+-
+-if [ "$1" = '-pip' -o "$1" = '--pip' ]; then
+-    shift
+-    exec pip-lock "$@"
+-fi
+-
+-if [ "$1" = '-fix-pkg-checksums' -o "$1" = '--fix-pkg-checksums' ]; then
+-    shift
+-    exec sage-fix-pkg-checksums "$@"
+-fi
+-
+ if [ "$1" = '-python' -o "$1" = '--python' ]; then
+     shift
+     exec python "$@"
+@@ -560,11 +361,6 @@
+     exec git "$@"
+ fi
+ 
+-if [ "$1" = '-git-branch' -o "$1" = '--git-branch' ]; then
+-    shift
+-    exec git --git-dir="$SAGE_ROOT"/.git rev-parse --abbrev-ref HEAD
+-fi
+-
+ if [ "$1" = '-sh' -o "$1" = '--sh' ]; then
+     # AUTHORS:
+     # - Carl Witty and William Stein: initial version
+@@ -684,20 +480,6 @@
+ fi
+ 
+ #####################################################################
+-# Test coverage of a module?
+-#####################################################################
+-
+-if [ "$1" = "-coverage" -o "$1" = "--coverage" ]; then
+-    shift
+-    exec sage-coverage "$@"
+-fi
+-
+-if [ "$1" = "-coverageall" -o "$1" = "--coverageall" ]; then
+-    shift
+-    exec sage-coverageall "$@"
+-fi
+-
+-#####################################################################
+ # File conversion
+ #####################################################################
+ 
+@@ -715,11 +497,6 @@
+ # Run Sage's versions of the standard Algebra/Geometry etc. software
+ #####################################################################
+ 
+-build_sage() {
+-    maybe_sage_location
+-    ( cd "$SAGE_SRC" && $MAKE ) || exit $?
+-}
+-
+ if [[ "$1" =~ ^--notebook=.* || "$1" =~ ^-n=.* || "$1" =~ ^-notebook=.* ]] ; then
+     sage-cleaner &>/dev/null &
+     exec sage-notebook "$@"
+@@ -730,13 +507,6 @@
+     exec sage-notebook "$@"
  fi
  
- if [ "$1" = '-mwrank' -o "$1" = '--mwrank' ]; then
+-if [ "$1" = "-bn" -o "$1" = "--build-and-notebook" ]; then
+-    shift
+-    build_sage
+-    sage-cleaner &>/dev/null &
+-    exec sage-notebook --notebook=default "$@"
+-fi
+-
+ if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then
+     shift
+     sage-cleaner &>/dev/null &
+@@ -755,38 +525,19 @@
+    exit 0
+ fi
+ 
+-if [ "$1" = '-b' ]; then
+-    time build_sage
+-    exit $?
+-fi
+-
+-if [ "$1" = '-br' -o "$1" = "--br" ]; then
+-    build_sage
+-    interactive_sage
+-fi
+-
+ if [ "$1" = '-r' ]; then
+    shift
+    interactive_sage
+ fi
+ 
+-if [ "$1" = '-ba' -o "$1" = '-ba-force' -o "$1" = '--ba-force' ]; then
+-    ( cd "$SAGE_SRC" && make clean )
+-    build_sage
+-    exit $?
+-fi
+-
+-if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" = '-tp' -o "$1" = '-btp' ]; then
+-    if [ "$1" = '-bt' -o "$1" = '-btp' ]; then
+-        build_sage
+-    fi
++if [ "$1" = '-t' -o "$1" = '-tp' ]; then
+     if [ ! -f  "$DOT_SAGE"/init.sage ]; then
+         echo >&2 "init.sage does not exist ... creating"
+         touch "$DOT_SAGE"/init.sage
+     fi
+     SAGE_BANNER=no sage_setup
+     export PYTHONIOENCODING="utf-8"  # Fix encoding for doctests
+-    if [ "$1" = '-tp' -o "$1" = '-btp' ]; then
++    if [ "$1" = '-tp' ]; then
+         shift
+         exec sage-runtests -p "$@"
+     else
+@@ -795,16 +546,6 @@
+     fi
+ fi
+ 
+-if [ "$1" = '-tnew' -o "$1" = '-btnew' ]; then
+-    if [ "$1" = '-btnew' ]; then
+-        build_sage
+-    fi
+-    shift
+-    SAGE_BANNER=no sage_setup
+-    export PYTHONIOENCODING="utf-8"  # Fix encoding for doctests
+-    exec sage-runtests --new "$@"
+-fi
+-
+ if [ "$1" = '-testall' -o "$1" = "--testall" ]; then
+     shift
+     SAGE_BANNER=no sage_setup
+@@ -819,119 +560,6 @@
+     exec sage-eval "$@"
+ fi
+ 
+-if [ "$1" = '--location' ]; then
+-    maybe_sage_location
+-    exit 0
+-fi
+-
+-
+-install() {
+-    maybe_sage_location
+-
+-    for PKG in "$@"
+-    do
+-        # Check for options
+-        case "$PKG" in
+-            -*)
+-                INSTALL_OPTIONS="$INSTALL_OPTIONS $PKG"
+-                continue;;
+-        esac
+-
+-        PKG_NAME=`echo "$PKG" | sed -e "s/\.spkg$//"`
+-        PKG_NAME=`basename "$PKG_NAME"`
+-
+-        sage-logger \
+-            "sage-spkg $INSTALL_OPTIONS '$PKG'" "$SAGE_LOGS/$PKG_NAME.log"
+-        # Do not try to install further packages if one failed
+-        if [ $? -ne 0 ]; then
+-            exit 1
+-        fi
+-    done
+-    # Display a message if we actually installed something (using this
+-    # file, generated by sage-spkg, is a bit of a hack though)
+-    if [ -f "$SAGE_LOCAL/lib/sage-force-relocate.txt" ]; then
+-        echo
+-        echo "Warning: it might be needed to update the Sage library before"
+-        echo "installed packages work: you should run 'make' from \$SAGE_ROOT"
+-        echo "before running Sage."
+-    fi
+-    exit 0
+-}
+-
+-
+-if [ "$1" = '-package' -o "$1" = "--package" ]; then
+-    shift
+-    exec sage-package $@
+-fi
+-
+-if [ "$1" = '-optional' -o "$1" = "--optional" ]; then
+-    shift
+-    exec sage-list-packages optional $@
+-fi
+-
+-if [ "$1" = '-experimental' -o "$1" = "--experimental" ]; then
+-    shift
+-    exec sage-list-packages experimental $@
+-fi
+-
+-if [ "$1" = '-standard' -o "$1" = "--standard" ]; then
+-    shift
+-    exec sage-list-packages standard $@
+-fi
+-
+-if [ "$1" = '-installed' -o "$1" = "--installed" ]; then
+-    shift
+-    exec sage-list-packages installed $@
+-fi
+-
+-if [ "$1" = '-p' ]; then
+-    shift
+-    # If there are no further arguments, display usage help.
+-    if [ $# -eq 0 ]; then
+-        exec sage-spkg
+-    fi
+-    install "$@"
+-fi
+-
+-if [ "$1" = '-info' -o "$1" = '--info' ]; then
+-    shift
+-    for PKG in "$@"
+-    do
+-        sage-spkg --info "$PKG" || exit $?
+-    done
+-    exit 0
+-fi
+-
+-if [ "$1" = '-pkg' -o "$1" = '-spkg' -o "$1" = "--pkg" -o "$1" = "--spkg" ]; then
+-    shift
+-    exec sage-pkg "$@"
+-fi
+-
+-if [ "$1" = '-pkg_nc' -o "$1" = "--pkg_nc" ]; then
+-    shift
+-    exec sage-pkg -n "$@"
+-fi
+-
+-if [ "$1" = '-sdist' -o "$1" = "--sdist" ]; then
+-    maybe_sage_location
+-    shift
+-    exec sage-sdist "$@"
+-fi
+-
+-if [ "$1" = '-rsyncdist' -o "$1" = "--rsyncdist" ]; then
+-    if [ $# -ne 2 ]; then
+-        echo >&2 "** MISSING VERSION NUMBER! **"
+-        exit 2
+-    fi
+-    maybe_sage_location
+-    exec sage-rsyncdist $2
+-fi
+-
+-if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then
+-    shift
+-    exec python -m "sage_setup.docbuild" "$@"
+-fi
+-
+ if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
+     shift
+     sage_setup
+@@ -996,10 +624,6 @@
+ fi
+ 
+ if [ $# -ge 1 ]; then
+-    T=`echo "$1" | sed -e "s/.*\.//"`
+-    if [ "$T" = "spkg" ]; then
+-        install "$@"
+-    fi
+     SAGE_BANNER=no sage_setup
+     unset TERM  # See Trac #12263
+     exec sage-run "$@"
diff --git a/debian/patches/debian-maxima.patch b/debian/patches/debian-maxima.patch
index c4f9cc2..47b3caa 100644
--- a/debian/patches/debian-maxima.patch
+++ b/debian/patches/debian-maxima.patch
@@ -82,3 +82,14 @@ Author: Tobias Hansen <thansen at debian.org>
              sage: a._check_valid()
              Traceback (most recent call last):
              ...
+--- a/sage/src/bin/sage
++++ b/sage/src/bin/sage
+@@ -328,7 +328,7 @@
+ 
+ if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then
+     shift
+-    exec maxima "$@"
++    exec maxima-sage "$@"
+ fi
+ 
+ if [ "$1" = '-mwrank' -o "$1" = '--mwrank' ]; then
diff --git a/debian/patches/debian-scripts-dir.patch b/debian/patches/debian-scripts-dir.patch
index bb5769b..dbdd330 100644
--- a/debian/patches/debian-scripts-dir.patch
+++ b/debian/patches/debian-scripts-dir.patch
@@ -5,7 +5,7 @@ Author: Tobias Hansen <thansen at debian.org>
 
 --- a/sage/src/bin/sage
 +++ b/sage/src/bin/sage
-@@ -336,7 +336,12 @@
+@@ -196,7 +196,12 @@
  # append -env to that). We redirect stdout to stderr, which is safer
  # for scripts.
  #####################################################################
@@ -19,7 +19,7 @@ Author: Tobias Hansen <thansen at debian.org>
  if [ $? -ne 0 ]; then
      echo >&2 "Error setting environment variables by sourcing '$0-env';"
      echo >&2 "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
-@@ -413,13 +418,13 @@
+@@ -251,13 +256,13 @@
  #####################################################################
  
  if [ "$1" = '-dumpversion' -o "$1" = '--dumpversion' ]; then
@@ -35,7 +35,7 @@ Author: Tobias Hansen <thansen at debian.org>
  	echo "SageMath version ${SAGE_VERSION}, Release Date: ${SAGE_RELEASE_DATE}"
  	exit 0
  fi
-@@ -924,12 +929,12 @@
+@@ -564,12 +569,12 @@
      shift
      sage_setup
      if [ "$SAGE_DEBUG" = "no" ]; then

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git



More information about the debian-science-commits mailing list