[perl-Term-ReadLine-Gnu] Fix regression with Debug::Client

Petr Pisar ppisar at fedoraproject.org
Tue Feb 17 14:07:30 UTC 2015


commit 5d7a0af530a655bb9cdeb60351871858ea7a3711
Author: Petr Písař <ppisar at redhat.com>
Date:   Tue Feb 17 14:58:10 2015 +0100

    Fix regression with Debug::Client

 ...-Propagete-PerlIO_return_value_from_STORE.patch |  120 ++++++++++++++++++++
 perl-Term-ReadLine-Gnu.spec                        |    8 +-
 2 files changed, 127 insertions(+), 1 deletions(-)
---
diff --git a/Term-ReadLine-Gnu-1.26-Propagete-PerlIO_return_value_from_STORE.patch b/Term-ReadLine-Gnu-1.26-Propagete-PerlIO_return_value_from_STORE.patch
new file mode 100644
index 0000000..28af1e3
--- /dev/null
+++ b/Term-ReadLine-Gnu-1.26-Propagete-PerlIO_return_value_from_STORE.patch
@@ -0,0 +1,120 @@
+From rt-cpan-org-return at perl.org Sat Feb 14 15:55:27 2015
+Return-Path: rt-cpan-org-return at perl.org
+Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO
+ zmta01.collab.prod.int.phx2.redhat.com) (10.5.81.8) by
+ zmail14.collab.prod.int.phx2.redhat.com with LMTP; Sat, 14 Feb 2015
+ 09:55:26 -0500 (EST)
+Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])
+	by zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E1D8A18201D
+	for <ppisar at mail.corp.redhat.com>; Sat, 14 Feb 2015 09:55:26 -0500 (EST)
+Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.20])
+	by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1EEtQUx006072
+	for <ppisar at redhat.com>; Sat, 14 Feb 2015 09:55:26 -0500
+Received: from rtcpan.develooper.com (rtcpan.develooper.com [207.171.7.181])
+	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1EEtPNd031234
+	for <ppisar at redhat.com>; Sat, 14 Feb 2015 09:55:25 -0500
+Received: by rtcpan.develooper.com (Postfix, from userid 536)
+	id 87E12A8D; Sat, 14 Feb 2015 06:55:25 -0800 (PST)
+Precedence: normal
+Subject: [rt.cpan.org #101078] causes debugger to exit immediately on 5.21.7
+From: "Hiroo_HAYASHI via RT" <bug-Term-ReadLine-Gnu at rt.cpan.org>
+Reply-To: bug-Term-ReadLine-Gnu at rt.cpan.org
+In-Reply-To: <rt-4.0.18-11247-1423752768-1953.101078-7-0 at rt.cpan.org>
+References: <RT-Ticket-101078 at rt.cpan.org>
+ <rt-4.0.18-26896-1421721368-1369.101078-7-0 at rt.cpan.org>
+ <rt-4.0.18-1618-1422198150-338.101078-7-0 at rt.cpan.org>
+ <rt-4.0.18-14672-1422231470-960.101078-7-0 at rt.cpan.org>
+Message-ID: <rt-4.0.18-20587-1423925725-1549.101078-7-0 at rt.cpan.org>
+X-RT-Loop-Prevention: rt.cpan.org
+RT-Ticket: rt.cpan.org #101078
+Managed-BY: RT 4.0.18 (http://www.bestpractical.com/rt/)
+RT-Originator: HAYASHI at cpan.org
+CC: ppisar at redhat.com, TONYC at cpan.org
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset="utf-8"
+X-RT-Original-Encoding: utf-8
+Date: Sat, 14 Feb 2015 09:55:25 -0500
+X-RedHat-Spam-Score: -1.9  (BAYES_00,SPF_PASS,URIBL_BLOCKED) 207.171.7.181 rtcpan.develooper.com 207.171.7.181 rtcpan.develooper.com <rt-cpan-org-return at perl.org>
+X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26
+X-Scanned-By: MIMEDefang 2.68 on 10.5.110.20
+Status: RO
+Content-Length: 2065
+Lines: 75
+
+<URL: https://rt.cpan.org/Ticket/Display.html?id=101078 >
+
+Hi,
+
+Thank you for your report.
+
+On Thu, 12 Feb 2015 14:52:48 GMT, ppisar wrote:
+> Dne Čt 12.úno.2015 09:51:59, ppisar napsal(a):
+> > I found this change causing a dead-lock in Debug-Client-0.29 tests
+> > (see <https://github.com/PadreIDE/Debug-Client/issues/1>). I don't
+> > know which party is more guilty, but I observe that perl debugger does
+> > not emit "DB<1>" prompt if it is run from the Debug-Client's test, so
+> > it does not process client "c" command and everything halts.
+> 
+> I should note that I use perl 5.20.1.
+
+Here is a fix.  I don't know why 1.26 fails or why this works.
+
+===================================================================
+--- Gnu.pm	(revision 481)
++++ Gnu.pm	(working copy)
+@@ -725,9 +725,8 @@
+     } elsif ($type eq 'F') {
+ 	return _rl_store_function($value, $id);
+     } elsif ($type eq 'IO') {
+-	my $FH = $value;
+ 	# Pass filehandles to the GNU Readline Library
+-	_rl_store_iostream($FH, $id);
++	my $FH = _rl_store_iostream($value, $id);
+ 	# pop stdio layer pushed by PerlIO_findFILE().
+ 	# https://rt.cpan.org/Ticket/Display.html?id=59832
+ 	my @layers = PerlIO::get_layers($FH);
+===================================================================
+--- Gnu.xs	(revision 481)
++++ Gnu.xs	(working copy)
+@@ -3138,7 +3138,7 @@
+ 	  }
+ 	}
+ 
+-void
++PerlIO *
+ _rl_store_iostream(stream, id)
+ 	PerlIO *stream
+ 	int id
+@@ -3148,9 +3148,11 @@
+ 	  switch (id) {
+ 	  case 0:
+ 	    rl_instream = PerlIO_findFILE(stream);
++	    RETVAL = stream;
+ 	    break;
+ 	  case 1:
+ 	    rl_outstream = PerlIO_findFILE(stream);
++	    RETVAL = stream;
+ #ifdef __CYGWIN__
+ 	    {
+ 	      /* Cygwin b20.1 library converts NL to CR-NL
+@@ -3167,11 +3169,14 @@
+ 	    break;
+ 	  default:
+ 	    warn("Gnu.xs:_rl_store_iostream: Illegal `id' value: `%d'", id);
++	    XSRETURN_UNDEF;
+ 	    break;
+ 	  }
+ 	  PerlIO_debug("TRG:store_iostream id %d fd %d\n",
+-		       id, PerlIO_fileno(stream));
++		       id, PerlIO_fileno(RETVAL));
+ 	}
++     OUTPUT:
++	RETVAL
+ 
+ #if 0 /* not used since 1.26 */
+ 
+
+
+
+
diff --git a/perl-Term-ReadLine-Gnu.spec b/perl-Term-ReadLine-Gnu.spec
index 2e8ca45..758521d 100644
--- a/perl-Term-ReadLine-Gnu.spec
+++ b/perl-Term-ReadLine-Gnu.spec
@@ -1,10 +1,12 @@
 Name:           perl-Term-ReadLine-Gnu
 Version:        1.26
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Perl extension for the GNU Readline/History Library
 License:        GPL+ or Artistic
 URL:            http://search.cpan.org/dist/Term-ReadLine-Gnu/
 Source0:        http://www.cpan.org/authors/id/H/HA/HAYASHI/Term-ReadLine-Gnu-%{version}.tar.gz
+# Fix regression with Debug::Client, bug #1189459, CPAN RT#101078
+Patch0:         Term-ReadLine-Gnu-1.26-Propagete-PerlIO_return_value_from_STORE.patch
 BuildRequires:  perl(ExtUtils::MakeMaker)
 BuildRequires:  ncurses-devel
 BuildRequires:  readline-devel >= 2.1
@@ -20,6 +22,7 @@ An implementation of Term::ReadLine using the GNU Readline/History Library.
 
 %prep
 %setup -q -n Term-ReadLine-Gnu-%{version}
+%patch0 -p0
 
 
 %build
@@ -59,6 +62,9 @@ expect -c '
 
 
 %changelog
+* Tue Feb 17 2015 Petr Pisar <ppisar at redhat.com> - 1.26-2
+- Fix regression with Debug::Client (bug #1189459)
+
 * Sun Feb 01 2015 Emmanuel Seyman <emmanuel at seyman.fr> - 1.26-1
 - Update to 1.26
 - Tighten file listing


More information about the scm-commits mailing list