[perl] Do not load system Term::ReadLine::Gnu while running tests

Petr Pisar ppisar at fedoraproject.org
Fri Jul 12 07:36:57 UTC 2013


commit b2d0216f43173f5e655ea20c36ffe42637863fc6
Author: Petr Písař <ppisar at redhat.com>
Date:   Mon Jul 8 16:26:25 2013 +0200

    Do not load system Term::ReadLine::Gnu while running tests

 ...-5.18.0-Suppress-system-Term-ReadLine-Gnu.patch |   43 ++++++++++++++++++++
 perl.spec                                          |   11 +++++-
 2 files changed, 53 insertions(+), 1 deletions(-)
---
diff --git a/perl-5.18.0-Suppress-system-Term-ReadLine-Gnu.patch b/perl-5.18.0-Suppress-system-Term-ReadLine-Gnu.patch
new file mode 100644
index 0000000..f82cf5c
--- /dev/null
+++ b/perl-5.18.0-Suppress-system-Term-ReadLine-Gnu.patch
@@ -0,0 +1,43 @@
+From 7fb8bf6b9bd4b199baaa0209061af0ccc11d30d9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Mon, 8 Jul 2013 16:10:38 +0200
+Subject: [PATCH] Suppress system Term::ReadLine::Gnu
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+perl5db.t will die in Term::ReadLine if Term::ReadLine::Gnu is installed
+in the system. Let's favour core implementation.
+
+Best solution would be to prune @INC to prevent from loading already
+installed modules like this:
+
+BEGIN {
+    use Config;
+    @INC = grep { ! /^\Q$Config{installprefix}\E(\/|\z)/ } @INC;
+}
+
+However that is not possible (now) due to various execs (even without
+proper -I) in the harness chain. perl should implement -nostdinc
+option.
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ lib/perl5db.t | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/perl5db.t b/lib/perl5db.t
+index 0e507b2..67cdd24 100644
+--- a/lib/perl5db.t
++++ b/lib/perl5db.t
+@@ -26,6 +26,7 @@ BEGIN {
+         print "1..0 # Skip: \$ENV{PERL5DB} is already set to '$ENV{PERL5DB}'\n";
+         exit 0;
+     }
++    $ENV{PERL_RL} = 'Perl'; # Suppress system Term::ReadLine::Gnu
+ }
+ 
+ plan(113);
+-- 
+1.8.1.4
+
diff --git a/perl.spec b/perl.spec
index dab97bd..862db49 100644
--- a/perl.spec
+++ b/perl.spec
@@ -31,7 +31,7 @@
 Name:           perl
 Version:        %{perl_version}
 # release number must be even higher, because dual-lived modules will be broken otherwise
-Release:        281%{?dist}
+Release:        282%{?dist}
 Epoch:          %{perl_epoch}
 Summary:        Practical Extraction and Report Language
 Group:          Development/Languages
@@ -92,6 +92,10 @@ Patch12:        perl-5.18.0-Fix-perl5db-test.patch
 # Fix regmatch pointer 32-bit wraparound regression, RT#118175
 Patch13:        perl-5.18.0-Fix-regmatch-pointer-32-bit-wraparound-regression.patch
 
+# Prevent from loading system Term::ReadLine::Gnu while running tests,
+# RT#118821
+Patch14:        perl-5.18.0-Suppress-system-Term-ReadLine-Gnu.patch
+
 # Update some of the bundled modules
 # see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
 
@@ -1871,6 +1875,7 @@ tarball from perl.org.
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
+%patch14 -p1
 
 %if !%{defined perl_bootstrap}
 # Local patch tracking
@@ -1887,6 +1892,7 @@ perl -x patchlevel.h \
     'Fedora Patch10: Update h2ph(1) documentation (RT#117647)' \
     'Fedora Patch11: Update pod2html(1) documentation (RT#117623)' \
     'Fedora Patch13: Fix regmatch pointer 32-bit wraparound regression (RT#118175)' \
+    'Fedora Patch14: Do not use system Term::ReadLine::Gnu in tests (RT#118821)' \
     %{nil}
 %endif
 
@@ -3556,6 +3562,9 @@ sed \
 
 # Old changelog entries are preserved in CVS.
 %changelog
+* Mon Jul 08 2013 Petr Pisar <ppisar at redhat.com> - 4:5.18.0-282
+- Do not load system Term::ReadLine::Gnu while running tests
+
 * Thu Jul 04 2013 Jitka Plesnikova <jplesnik at redhat.com> - 4:5.18.0-281
 - Update to Perl 5.18.0
 - Clean patches, not needed with new version


More information about the scm-commits mailing list