From dac4719e0b05e7bfc95eb17a8cb8500b288ad019 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Fri, 2 Aug 2019 18:00:41 +0200 Subject: [PATCH] sage: add patch to debug transient issue --- .../configurationpy-error-verbose.patch | 19 +++++++++++++++++++ .../science/math/sage/sage-src.nix | 6 +++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch diff --git a/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch b/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch new file mode 100644 index 00000000000..e687281ad1a --- /dev/null +++ b/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch @@ -0,0 +1,19 @@ +diff --git a/src/sage/repl/configuration.py b/src/sage/repl/configuration.py +index 67d7d2accf..18279581e2 100644 +--- a/src/sage/repl/configuration.py ++++ b/src/sage/repl/configuration.py +@@ -9,10 +9,11 @@ the IPython simple prompt is being used:: + sage: cmd = 'print([sys.stdin.isatty(), sys.stdout.isatty()])' + sage: import pexpect + sage: output = pexpect.run( +- ....: 'bash -c \'echo "{0}" | sage\''.format(cmd), ++ ....: 'bash -c \'export SAGE_BANNER=no; echo "{0}" | sage\''.format(cmd), + ....: ).decode('utf-8', 'surrogateescape') +- sage: 'sage: [False, True]' in output +- True ++ sage: print(output) ++ sage...[False, True] ++ sage...Exiting Sage ... + """ + + #***************************************************************************** diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 51460154c5d..84c2ef3ec78 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -61,7 +61,11 @@ stdenv.mkDerivation rec { # Since sage unfortunately does not release bugfix releases, packagers must # fix those bugs themselves. This is for critical bugfixes, where "critical" # == "causes (transient) doctest failures / somebody complained". - bugfixPatches = [ ]; + bugfixPatches = [ + # To help debug the transient error in + # https://trac.sagemath.org/ticket/23087 when it next occurs. + ./patches/configurationpy-error-verbose.patch + ]; # Patches needed because of package updates. We could just pin the versions of # dependencies, but that would lead to rebuilds, confusion and the burdons of