From 14dbb93df43894844b36b09a4a29a95893761ca4 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 89e154d..fcf4b1a 100644
--- a/perl-CPAN.spec
+++ b/perl-CPAN.spec
@@ -32,6 +32,9 @@ Patch9:         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>
 Patch10:        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>
+Patch11:        CPAN-2.14-logger-die-does-not-exist.patch
 BuildArch:      noarch
 BuildRequires:  coreutils
 BuildRequires:  findutils
@@ -218,6 +221,7 @@ external download clients to fetch distributions from the 
net.
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
+%patch11 -p1
 # Change configuration name
 find -type f -exec sed -i -e 's/XCPANCONFIGNAMEX/cpan/g' {} \;
 # Remove bundled modules
@@ -246,6 +250,7 @@ make test
 %changelog
 * Mon Jan 09 2017 Petr Pisar <ppi...@redhat.com> - 2.14-4
 - Use Perl porter's fix for searching cpan -j file (CPAN RT#116507)
+- Fix logging fatal errors (https://github.com/andk/cpanpm/pull/104)
 
 * Tue Oct 18 2016 Petr Pisar <ppi...@redhat.com> - 2.14-3
 - Apply remains of CVE-2016-1238 fix from perl (CPAN RT#116507)
-- 
cgit v0.12


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