[sagemath] 01/01: Document the deeper details of the issue

Ximin Luo infinity0 at debian.org
Sun Oct 16 13:47:48 UTC 2016


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

infinity0 pushed a commit to branch master
in repository sagemath.

commit 81aabb7b3892914569718d2654838177a87e0969
Author: Ximin Luo <infinity0 at debian.org>
Date:   Sun Oct 16 15:47:34 2016 +0200

    Document the deeper details of the issue
---
 debian/patches/debian-temp-r-no-readline.patch | 27 ++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/debian/patches/debian-temp-r-no-readline.patch b/debian/patches/debian-temp-r-no-readline.patch
index 1079622..317a68d 100644
--- a/debian/patches/debian-temp-r-no-readline.patch
+++ b/debian/patches/debian-temp-r-no-readline.patch
@@ -1,4 +1,31 @@
 Description: Pass --no-readline to R otherwise Pexpect hangs
+ If anyone wants to dig deeper on *why* readline is messing things up:
+ By adding some debug-printing code to sage/interfaces/r.py and
+ pexpect/spawnbase.py one gets the following trace:
+ .
+ $ ./sage -c 'r([10.4,5.6,3.1,6.4,21.7])'
+ Write to R: sage0 <- 10.400000000000000
+ Pexpect reads: '> '
+ ----
+ > 
+ ----
+ Write to R: options(prompt="__SAGE__R__PROMPT__> ",continue="__SAGE__R__PROMPT__> ", width=100,pager="cat",device="png")
+ Pexpect reads: '1+961840267;\r\n[1] 961840268\r\n> '
+ ----
+ 1+961840267;
+ [1] 961840268
+ > 
+ ----
+ [ rest of the trace is irrelevant ]
+ .
+ This then messes up the rest of the logic which causes a hang as Pexpect waits
+ for the "__SAGE__R__PROMPT__> " string which is what R is *supposed* to do.
+ The second number is different every time, but it's always "1+$n\r\n[1] $sum".
+ .
+ The hang occurs both with and without Sage's pexpect patch so I kept the patch
+ out for now. (Note that if you want to apply the patch to test it yourself,
+ with Debian's pexpect 4.2.0 you must first replace "self.__select" with
+ "select_ignore_interrupts", everywhere that it occurs.)
 Author: Ximin Luo <infinity0 at debian.org>
 Forwarded: TODO, maybe not-needed
 ---

-- 
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