From af1837390e5ca3e0ef61cb677ba0094866628005 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Mon, 9 Jan 2017 16:24:12 +0100
Subject: Fix logging fatal errors

---
 CPAN-2.14-logger-die-does-not-exist.patch | 38 +++++++++++++++++++++++++++++++
 perl-CPAN.spec                            |  5 ++++
 2 files changed, 43 insertions(+)
 create mode 100644 CPAN-2.14-logger-die-does-not-exist.patch

diff --git a/CPAN-2.14-logger-die-does-not-exist.patch 
b/CPAN-2.14-logger-die-does-not-exist.patch
new file mode 100644
index 0000000..7354f03
--- /dev/null
+++ b/CPAN-2.14-logger-die-does-not-exist.patch
@@ -0,0 +1,38 @@
+From f7fc39436aa91c783142fef58853abdb30a5d2bc Mon Sep 17 00:00:00 2001
+From: Simon Legner <simon.leg...@gmail.com>
+Date: Tue, 11 Oct 2016 12:47:56 +0200
+Subject: [PATCH] $logger->die does not exist
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Petr Písař <ppi...@redhat.com>
+---
+ lib/App/Cpan.pm | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/App/Cpan.pm b/lib/App/Cpan.pm
+index c654c2c..742cbd2 100644
+--- a/lib/App/Cpan.pm
++++ b/lib/App/Cpan.pm
+@@ -1033,7 +1033,7 @@ sub _load_local_lib # -I
+ 
+       my $rc = _safe_load_module("local::lib");
+       unless( $rc ) {
+-              $logger->die( "Could not load local::lib" );
++              $logger->logdie( "Could not load local::lib" );
+               }
+ 
+       local::lib->import;
+@@ -1045,7 +1045,7 @@ sub _use_these_mirrors # -M
+       {
+       $logger->debug( "Setting per session mirrors" );
+       unless( $_[0] ) {
+-              $logger->die( "The -M switch requires a comma-separated list of 
mirrors" );
++              $logger->logdie( "The -M switch requires a comma-separated list 
of mirrors" );
+               }
+ 
+       $CPAN::Config->{urllist} = [ split /,/, $_[0] ];
+-- 
+2.7.4
+
diff --git a/perl-CPAN.spec b/perl-CPAN.spec
index 85784a0..7591940 100644
--- a/perl-CPAN.spec
+++ b/perl-CPAN.spec
@@ -23,6 +23,9 @@ Patch4:         CPAN-2.14-Fix-CVE-2016-1238-completely.patch
 # Fix-CVE-2016-1238-completely.patch, CPAN RT#116507, proposed in
 # <https://github.com/andk/cpanpm/pull/105>
 Patch5:         CPAN-2.14-For-cpan-j-make-the-file-an-absolute-path.patch
+# Fix logging fatal errors, fixed after 2.14,
+# <https://github.com/andk/cpanpm/pull/104>
+Patch6:         CPAN-2.14-logger-die-does-not-exist.patch
 BuildArch:      noarch
 BuildRequires:  coreutils
 BuildRequires:  findutils
@@ -199,6 +202,7 @@ external download clients to fetch distributions from the 
net.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 # Change configuration name
 find -type f -exec sed -i -e 's/XCPANCONFIGNAMEX/cpan/g' {} \;
 # Remove bundled modules
@@ -228,6 +232,7 @@ make test
 * Mon Jan 09 2017 Petr Pisar <ppi...@redhat.com> - 2.11-350
 - Fix CVE-2016-1238 (loading optional modules from current working directory)
 - Do not search cpan -j file in @INC (CPAN RT#116507)
+- Fix logging fatal errors (https://github.com/andk/cpanpm/pull/104)
 
 * Thu Feb 04 2016 Fedora Release Engineering <rel...@fedoraproject.org> - 
2.11-349
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-CPAN.git/commit/?h=f24&id=af1837390e5ca3e0ef61cb677ba0094866628005
_______________________________________________
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