From 79577ac3e93fcd807c1cf87c7aaebabfd288032c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 12 Oct 2016 14:25:15 +0200 Subject: [PATCH] Fix installation from a working directory --- ...r-bug-https-rt.cpan.org-Ticket-Displ.patch | 32 +++++++++++++++++++ perl-CPAN.spec | 4 +++ 2 files changed, 36 insertions(+) create mode 100644 CPAN-2.14-Emergency-fix-for-bug-https-rt.cpan.org-Ticket-Displ.patch diff --git a/CPAN-2.14-Emergency-fix-for-bug-https-rt.cpan.org-Ticket-Displ.patch b/CPAN-2.14-Emergency-fix-for-bug-https-rt.cpan.org-Ticket-Displ.patch new file mode 100644 index 0000000..29638b5 --- /dev/null +++ b/CPAN-2.14-Emergency-fix-for-bug-https-rt.cpan.org-Ticket-Displ.patch @@ -0,0 +1,32 @@ +From 5c3f9935b2ac05fcd41b4c933fa05f326903484c Mon Sep 17 00:00:00 2001 +From: Andreas Koenig +Date: Fri, 8 Jul 2016 21:25:53 +0200 +Subject: [PATCH] Emergency fix for bug + https://rt.cpan.org/Ticket/Display.html?id=115734 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + lib/App/Cpan.pm | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/App/Cpan.pm b/lib/App/Cpan.pm +index 59642ed..d770bf5 100644 +--- a/lib/App/Cpan.pm ++++ b/lib/App/Cpan.pm +@@ -1480,7 +1480,9 @@ sub _expand_module + { + my( $module ) = @_; + +- my $expanded = CPAN::Shell->expand( "Module", $module ); ++ my $expanded = CPAN::Shell->expandany( $module ); ++ return $expanded if $expanded; ++ $expanded = CPAN::Shell->expand( "Module", $module ); + unless( defined $expanded ) { + $logger->error( "Could not expand [$module]. Check the module name." ); + my $threshold = ( +-- +2.7.4 + diff --git a/perl-CPAN.spec b/perl-CPAN.spec index 6a4062c..a1861e6 100644 --- a/perl-CPAN.spec +++ b/perl-CPAN.spec @@ -10,6 +10,8 @@ Source0: http://www.cpan.org/authors/id/A/AN/ANDK/CPAN-%{version}.tar.gz Patch0: CPAN-2.14-Attemp-to-create-site-library-directories-on-first-t.patch # Change configuration directory name Patch1: CPAN-2.14-Replace-configuration-directory-string-with-a-marke.patch +# Fix installation from a working directory, CPAN RT#115734, fixed after 2.14 +Patch2: CPAN-2.14-Emergency-fix-for-bug-https-rt.cpan.org-Ticket-Displ.patch BuildArch: noarch BuildRequires: coreutils BuildRequires: findutils @@ -187,6 +189,7 @@ external download clients to fetch distributions from the net. %setup -q -n CPAN-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 # Change configuration name find -type f -exec sed -i -e 's/XCPANCONFIGNAMEX/cpan/g' {} \; # Remove bundled modules @@ -215,6 +218,7 @@ make test %changelog * Mon Jun 27 2016 Petr Pisar - 2.14-1 - 2.14 bump +- Fix installation from a working directory (CPAN RT#115734) * Wed May 18 2016 Jitka Plesnikova - 2.11-366 - Perl 5.24 re-rebuild of bootstrapped packages