f40119
From 582ed99d657fb10750e31e942f88b6ddc0259e01 Mon Sep 17 00:00:00 2001
f40119
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
f40119
Date: Wed, 10 May 2017 16:44:06 +0200
f40119
Subject: [PATCH] Rebase to 2.18 from perl-5.25.12
f40119
MIME-Version: 1.0
f40119
Content-Type: text/plain; charset=UTF-8
f40119
Content-Transfer-Encoding: 8bit
f40119
f40119
Signed-off-by: Petr Písař <ppisar@redhat.com>
f40119
---
f40119
 lib/CPAN.pm              | 2 +-
f40119
 lib/CPAN/Bundle.pm       | 7 ++++++-
f40119
 lib/CPAN/Distribution.pm | 8 +++++++-
f40119
 3 files changed, 14 insertions(+), 3 deletions(-)
f40119
f40119
diff --git a/lib/CPAN.pm b/lib/CPAN.pm
f40119
index 1fba5c1..4f02850 100644
f40119
--- a/lib/CPAN.pm
f40119
+++ b/lib/CPAN.pm
f40119
@@ -2,7 +2,7 @@
f40119
 # vim: ts=4 sts=4 sw=4:
f40119
 use strict;
f40119
 package CPAN;
f40119
-$CPAN::VERSION = '2.16';
f40119
+$CPAN::VERSION = '2.18';
f40119
 $CPAN::VERSION =~ s/_//;
f40119
 
f40119
 # we need to run chdir all over and we would get at wrong libraries
f40119
diff --git a/lib/CPAN/Bundle.pm b/lib/CPAN/Bundle.pm
f40119
index 3f17b54..3b4e93d 100644
f40119
--- a/lib/CPAN/Bundle.pm
f40119
+++ b/lib/CPAN/Bundle.pm
f40119
@@ -8,7 +8,7 @@ use CPAN::Module;
f40119
 use vars qw(
f40119
             $VERSION
f40119
 );
f40119
-$VERSION = "5.5002";
f40119
+$VERSION = "5.5003";
f40119
 
f40119
 sub look {
f40119
     my $self = shift;
f40119
@@ -21,6 +21,11 @@ sub undelay {
f40119
     delete $self->{later};
f40119
     for my $c ( $self->contains ) {
f40119
         my $obj = CPAN::Shell->expandany($c) or next;
f40119
+        if ($obj->id eq $self->id){
f40119
+            my $id = $obj->id;
f40119
+            $CPAN::Frontend->mywarn("$id seems to contain itself, skipping\n");
f40119
+            next;
f40119
+        }
f40119
         $obj->undelay;
f40119
     }
f40119
 }
f40119
diff --git a/lib/CPAN/Distribution.pm b/lib/CPAN/Distribution.pm
f40119
index b5744fd..64976eb 100644
f40119
--- a/lib/CPAN/Distribution.pm
f40119
+++ b/lib/CPAN/Distribution.pm
f40119
@@ -8,7 +8,7 @@ use CPAN::InfoObj;
f40119
 use File::Path ();
f40119
 @CPAN::Distribution::ISA = qw(CPAN::InfoObj);
f40119
 use vars qw($VERSION);
f40119
-$VERSION = "2.16";
f40119
+$VERSION = "2.18";
f40119
 
f40119
 # no prepare, because prepare is not a command on the shell command line
f40119
 # TODO: clear instance cache on reload
f40119
@@ -377,6 +377,7 @@ sub get {
f40119
                            ? $ENV{PERL5LIB}
f40119
                            : ($ENV{PERLLIB} || "");
f40119
     local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : "";
f40119
+    # local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # get
f40119
     $CPAN::META->set_perl5lib;
f40119
     local $ENV{MAKEFLAGS}; # protect us from outer make calls
f40119
 
f40119
@@ -1302,6 +1303,7 @@ Could not determine which directory to use for looking at $dist.
f40119
                 : ($ENV{PERLLIB} || "");
f40119
 
f40119
         local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : "";
f40119
+        # local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # look
f40119
         $CPAN::META->set_perl5lib;
f40119
         local $ENV{MAKEFLAGS}; # protect us from outer make calls
f40119
 
f40119
@@ -1821,6 +1823,7 @@ sub prepare {
f40119
                            ? $ENV{PERL5LIB}
f40119
                            : ($ENV{PERLLIB} || "");
f40119
     local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : "";
f40119
+    local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # prepare
f40119
     $CPAN::META->set_perl5lib;
f40119
     local $ENV{MAKEFLAGS}; # protect us from outer make calls
f40119
 
f40119
@@ -2115,6 +2118,7 @@ is part of the perl-%s distribution. To install that, you need to run
f40119
                            ? $ENV{PERL5LIB}
f40119
                            : ($ENV{PERLLIB} || "");
f40119
     local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : "";
f40119
+    local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # make
f40119
     $CPAN::META->set_perl5lib;
f40119
     local $ENV{MAKEFLAGS}; # protect us from outer make calls
f40119
 
f40119
@@ -3482,6 +3486,7 @@ sub test {
f40119
                            : ($ENV{PERLLIB} || "");
f40119
 
f40119
     local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : "";
f40119
+    local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # test
f40119
     $CPAN::META->set_perl5lib;
f40119
     local $ENV{MAKEFLAGS}; # protect us from outer make calls
f40119
     local $ENV{PERL_MM_USE_DEFAULT} = 1 if $CPAN::Config->{use_prompt_default};
f40119
@@ -3955,6 +3960,7 @@ sub install {
f40119
                            : ($ENV{PERLLIB} || "");
f40119
 
f40119
     local $ENV{PERL5OPT} = defined $ENV{PERL5OPT} ? $ENV{PERL5OPT} : "";
f40119
+    local $ENV{PERL_USE_UNSAFE_INC} = exists $ENV{PERL_USE_UNSAFE_INC} ? $ENV{PERL_USE_UNSAFE_INC} : 1; # install
f40119
     $CPAN::META->set_perl5lib;
f40119
     local $ENV{PERL_MM_USE_DEFAULT} = 1 if $CPAN::Config->{use_prompt_default};
f40119
     local $ENV{NONINTERACTIVE_TESTING} = 1 if $CPAN::Config->{use_prompt_default};
f40119
-- 
f40119
2.9.3
f40119