Skip to content
Snippets Groups Projects
Unverified Commit 7b7f610b authored by John Scott's avatar John Scott :frog:
Browse files

Patch the Sage backend to work around issue in the SageMath package.

parent 99c38e7b
No related branches found
No related tags found
1 merge request!4SageMath backend fixes
cantor (4:20.12.1-4) UNRELEASED; urgency=medium
[ John Scott ]
* Patch the Sage backend to work around issue in the SageMath package.
(Addresses: #972346)
-- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org> Sun, 17 Jan 2021 18:34:54 -0500
cantor (4:20.12.1-3) unstable; urgency=medium
* Revert changes of previous version, not buildable.
......
discount-build-verbose.diff
work-around-Sage-no-root.diff
Description: work around unset SAGE_ROOT in Debian Sage package
In this shell script, '$1' refers to the Sage binary that is to
be used. The script is needlessly complex to accommodate for old
versions of Sage, and perhaps the author is unaware of Sage's
new command-line arguments.
.
Debian's `sage --root` is an empty string, so Cantor fails to
start it. This patch is more succinct by starting the Sage shell
which sets all variables appropriately, then starting
'sage-ipython' as desired. This way, as opposed to having
'#!/usr/bin/sage --sh' as the shebang, still permits usage of
local Sage copies.
Author: John Scott <jscott@posteo.net>
Bug-Debian: https://bugs.debian.org/972346
Forwarded: no
Last-Update: 2021-01-17
--- cantor-20.12.1.orig/src/backends/sage/cantor-execsage
+++ cantor-20.12.1/src/backends/sage/cantor-execsage
@@ -1,23 +1,2 @@
#!/usr/bin/env bash
-
-export SAGE_ROOT="$($1 --root)"
-
-# Sage 9.2 stop source sage-env-config automatically, so do it manually
-if [[ -f $SAGE_ROOT"/bin/sage-env" ]]; then
- if [[ -f $SAGE_ROOT"/bin/sage-env-config" ]]; then
- source "$SAGE_ROOT/bin/sage-env-config" >&2
- fi
- . "$SAGE_ROOT/bin/sage-env" >&2
-elif [[ -f $SAGE_ROOT"/local/bin/sage-env" ]]; then
- if [[ -f $SAGE_ROOT"/local/bin/sage-env-config" ]]; then
- source "$SAGE_ROOT/local/bin/sage-env-config" >&2
- fi
- . "$SAGE_ROOT/local/bin/sage-env" >&2
-elif [[ -f $SAGE_ROOT"/src/bin/sage-env" ]]; then
- if [[ -f $SAGE_ROOT"/src/bin/sage-env-config" ]]; then
- source "$SAGE_ROOT/src/bin/sage-env-config" >&2
- fi
- . "$SAGE_ROOT/src/bin/sage-env" >&2
-fi
-
-exec sage-ipython -i --simple-prompt
+{ echo "sage-ipython -i --simple-prompt"; cat; } | $1 --sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment