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

This commit is contained in:
Petr Písař 2013-07-08 16:26:25 +02:00
parent 82af8ec5ce
commit b2d0216f43
2 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,43 @@
From 7fb8bf6b9bd4b199baaa0209061af0ccc11d30d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@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@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

View File

@ -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@redhat.com> - 4:5.18.0-282
- Do not load system Term::ReadLine::Gnu while running tests
* Thu Jul 04 2013 Jitka Plesnikova <jplesnik@redhat.com> - 4:5.18.0-281
- Update to Perl 5.18.0
- Clean patches, not needed with new version