From 58510aed748bbfc4bd29102049c61825cfb0f86e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Wed, 12 Oct 2016 15:20:50 +0200
Subject: Cope with non-digit version strings

---
 ...pts_module-must-be-protected-with-an-eval.patch | 35 ++++++++++++++++++++++
 perl-CPAN.spec                                     |  4 +++
 2 files changed, 39 insertions(+)
 create mode 100644 
CPAN-2.14-accepts_module-must-be-protected-with-an-eval.patch

diff --git a/CPAN-2.14-accepts_module-must-be-protected-with-an-eval.patch 
b/CPAN-2.14-accepts_module-must-be-protected-with-an-eval.patch
new file mode 100644
index 0000000..6843334
--- /dev/null
+++ b/CPAN-2.14-accepts_module-must-be-protected-with-an-eval.patch
@@ -0,0 +1,35 @@
+From 0bae2227c75b922a1d7441bf7bee58d01afb1dc8 Mon Sep 17 00:00:00 2001
+From: Andreas Koenig <a...@cpan.org>
+Date: Mon, 29 Aug 2016 22:04:52 +0200
+Subject: [PATCH] accepts_module must be protected with an eval
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+- otherwise cannot tolerate version numbers like 2.08a
+- could run into endless loop with "test Dancer::Plugin::SimpleCRUD"
+  which depended on HTML::Table 2.08a which was installed
+
+Signed-off-by: Petr Písař <ppi...@redhat.com>
+---
+ lib/CPAN/Distribution.pm | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/lib/CPAN/Distribution.pm b/lib/CPAN/Distribution.pm
+index fa9300d..ef85a3c 100644
+--- a/lib/CPAN/Distribution.pm
++++ b/lib/CPAN/Distribution.pm
+@@ -2842,7 +2842,9 @@ sub unsat_prereq {
+             $available_file = $nmo->available_file || '';
+             $available_version = $nmo->available_version;
+             if ($nmo->uptodate) {
+-                my $accepts = $merged->accepts_module($need_module, 
$available_version);
++                my $accepts = eval {
++                    $merged->accepts_module($need_module, $available_version);
++                };
+                 unless ($accepts) {
+                     my $rq = $merged->requirements_for_module( $need_module );
+                     $CPAN::Frontend->mywarn(
+-- 
+2.7.4
+
diff --git a/perl-CPAN.spec b/perl-CPAN.spec
index 0c2537b..6724388 100644
--- a/perl-CPAN.spec
+++ b/perl-CPAN.spec
@@ -24,6 +24,8 @@ Patch5:         
CPAN-2.14-URL-schemes-are-case-tolerant-so-the-regexp-should-h.p
 Patch6:         
CPAN-2.14-CVE-2016-1238-don-t-load-optional-modules-from-defau.patch
 # Recognize exact version dependency operator, CPAN RT#47934, fixed after 2.14
 Patch7:         
CPAN-2.14-Bugfix-47934-version-requirement-with-was-ignored.patch
+# Cope with non-digit version strings, fixed after 2.14
+Patch8:         CPAN-2.14-accepts_module-must-be-protected-with-an-eval.patch
 BuildArch:      noarch
 BuildRequires:  coreutils
 BuildRequires:  findutils
@@ -207,6 +209,7 @@ external download clients to fetch distributions from the 
net.
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 # Change configuration name
 find -type f -exec sed -i -e 's/XCPANCONFIGNAMEX/cpan/g' {} \;
 # Remove bundled modules
@@ -242,6 +245,7 @@ make test
 - Recognize URL schemata disregarding the case
 - Fix CVE-2016-1238 (loading optional modules from current working directory)
 - Recognize exact version dependency operator (CPAN RT#47934)
+- Cope with non-digit version strings
 
 * Wed May 18 2016 Jitka Plesnikova <jples...@redhat.com> - 2.11-366
 - Perl 5.24 re-rebuild of bootstrapped packages
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-CPAN.git/commit/?h=master&id=58510aed748bbfc4bd29102049c61825cfb0f86e
_______________________________________________
perl-devel mailing list -- perl-devel@lists.fedoraproject.org
To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org

Reply via email to