In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/0f848f672af19969695910e47f3dfe808b617836?hp=dca41e570075bea39d7e241adc0dd3918557da9b>

- Log -----------------------------------------------------------------
commit 0f848f672af19969695910e47f3dfe808b617836
Author: Chris 'BinGOs' Williams <[email protected]>
Date:   Tue Oct 19 08:24:35 2010 +0100

    Update CPAN to CPAN version 1.94_61
    
      [DELTA]
    
      2010-10-03  Andreas J. Koenig  <[email protected]>
    
      * release 1.94_61
    
      * address RT #61735: stop talking about sending test reports by email 
(Schwern)
    
      * prevent the use of old versions of Parse::CPAN::Meta which caused test 
failures
    
      * bandaid for native solaris patch program to actually do patching
    
      2010-09-28  Andreas J. Koenig  <[email protected]>
    
      * release 1.94_60
    
      * improvements to find_perl() by David Golden
    
      * test fixes to address the issues demonstrated by some cpantesters
    
      2010-09-26  Andreas J. Koenig  <[email protected]>
    
      * release 1.94_59
    
      * address RT #61607: make the FTP download code more robust  (Reini Urban)
    
      * omit useless arithmetic in CPAN::Version to possibly help netbsd
      (reported by Nigel Horne and suggested David Golden)
    
      * address RT #59216: make sure $builddir exists before calling tempdir
      (Lee Goddard)
    
      * a couple of new distropref files
    
      2010-06-24  Andreas J. Koenig  <[email protected]>
    
      * release 1.94_58
    
      * bugfix: Non-English locales got no diagnostics on a failed locking due
      to permissions (reported by Frank Wiegand)
    
      * chasing test failures with test fixes.
-----------------------------------------------------------------------

Summary of changes:
 Porting/Maintainers.pl             |    2 +-
 cpan/CPAN/Changes                  |   41 +++++++++++++++++++++++
 cpan/CPAN/lib/CPAN.pm              |   64 +++++++++++++++++++++++------------
 cpan/CPAN/lib/CPAN/Distribution.pm |   26 +++++++++++++--
 cpan/CPAN/lib/CPAN/FTP.pm          |   11 ++++--
 cpan/CPAN/lib/CPAN/FirstTime.pm    |    8 ++--
 cpan/CPAN/lib/CPAN/Queue.pm        |   26 ++++----------
 cpan/CPAN/lib/CPAN/Shell.pm        |    1 +
 cpan/CPAN/lib/CPAN/Version.pm      |    6 ++--
 pod/perldelta.pod                  |    4 ++
 10 files changed, 134 insertions(+), 55 deletions(-)
 mode change 100644 => 100755 cpan/CPAN/scripts/cpan

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 5c5f224..425ba7a 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -357,7 +357,7 @@ use File::Glob qw(:case);
     'CPAN' =>
        {
        'MAINTAINER'    => 'andk',
-       'DISTRIBUTION'  => 'ANDK/CPAN-1.94_57.tar.gz',
+       'DISTRIBUTION'  => 'ANDK/CPAN-1.94_61.tar.gz',
        'FILES'         => q[cpan/CPAN],
        'EXCLUDED'      => [ qr{^distroprefs/},
                             qr{^inc/Test/},
diff --git a/cpan/CPAN/Changes b/cpan/CPAN/Changes
index 4b2d697..ac8b97a 100644
--- a/cpan/CPAN/Changes
+++ b/cpan/CPAN/Changes
@@ -1,3 +1,44 @@
+2010-10-03  Andreas J. Koenig  <[email protected]>
+
+       * release 1.94_61
+
+       * address RT #61735: stop talking about sending test reports by email 
(Schwern)
+
+       * prevent the use of old versions of Parse::CPAN::Meta which caused 
test failures
+
+       * bandaid for native solaris patch program to actually do patching
+
+2010-09-28  Andreas J. Koenig  <[email protected]>
+
+       * release 1.94_60
+
+       * improvements to find_perl() by David Golden
+
+       * test fixes to address the issues demonstrated by some cpantesters
+
+2010-09-26  Andreas J. Koenig  <[email protected]>
+
+       * release 1.94_59
+
+       * address RT #61607: make the FTP download code more robust  (Reini 
Urban)
+
+       * omit useless arithmetic in CPAN::Version to possibly help netbsd
+       (reported by Nigel Horne and suggested David Golden)
+
+       * address RT #59216: make sure $builddir exists before calling tempdir
+       (Lee Goddard)
+
+       * a couple of new distropref files
+
+2010-06-24  Andreas J. Koenig  <[email protected]>
+
+       * release 1.94_58
+
+       * bugfix: Non-English locales got no diagnostics on a failed locking due
+       to permissions (reported by Frank Wiegand)
+
+       * chasing test failures with test fixes.
+
 2010-05-24  Andreas J. Koenig  <[email protected]>
 
        * release 1.94_57
diff --git a/cpan/CPAN/lib/CPAN.pm b/cpan/CPAN/lib/CPAN.pm
index 8d835cd..3d2859a 100644
--- a/cpan/CPAN/lib/CPAN.pm
+++ b/cpan/CPAN/lib/CPAN.pm
@@ -2,7 +2,7 @@
 # vim: ts=4 sts=4 sw=4:
 use strict;
 package CPAN;
-$CPAN::VERSION = '1.94_57';
+$CPAN::VERSION = '1.94_61';
 $CPAN::VERSION =~ s/_//;
 
 # we need to run chdir all over and we would get at wrong libraries
@@ -823,15 +823,14 @@ Please make sure the directory exists and is writable.
     if (!$RUN_DEGRADED && !$self->{LOCKFH}) {
         my $fh;
         unless ($fh = FileHandle->new("+>>$lockfile")) {
-            if ($! =~ /Permission/) {
-                $CPAN::Frontend->mywarn(qq{
+            $CPAN::Frontend->mywarn(qq{
 
 Your configuration suggests that CPAN.pm should use a working
 directory of
     $CPAN::Config->{cpan_home}
 Unfortunately we could not create the lock file
     $lockfile
-due to permission problems.
+due to '$!'.
 
 Please make sure that the configuration variable
     \$CPAN::Config->{cpan_home}
@@ -839,8 +838,7 @@ points to a directory where you can write a .lock file. You 
can set
 this variable in either a CPAN/MyConfig.pm or a CPAN/Config.pm in your
 \...@inc path;
 });
-                return suggest_myconfig;
-            }
+            return suggest_myconfig;
         }
         my $sleep = 1;
         while (!CPAN::_flock($fh, LOCK_EX|LOCK_NB)) {
@@ -923,31 +921,53 @@ sub fastcwd {Cwd::fastcwd();}
 #-> sub CPAN::backtickcwd ;
 sub backtickcwd {my $cwd = `cwd`; chomp $cwd; $cwd}
 
+# Adapted from Probe::Perl
+#-> sub CPAN::_perl_is_same
+sub _perl_is_same {
+  my ($perl) = @_;
+  return MM->maybe_command($perl)
+    && `$perl -MConfig=myconfig -e print -e myconfig` eq Config->myconfig;
+}
+
+# Adapted in part from Probe::Perl
 #-> sub CPAN::find_perl ;
 sub find_perl () {
-    my($perl) = File::Spec->file_name_is_absolute($^X) ? $^X : "";
-    unless ($perl) {
-        my $candidate = File::Spec->catfile($CPAN::iCwd,$^X);
-        $^X = $perl = $candidate if MM->maybe_command($candidate);
+    if ( File::Spec->file_name_is_absolute($^X) ) {
+        return $^X;
     }
-    unless ($perl) {
-        my ($component,$perl_name);
-      DIST_PERLNAME: foreach $perl_name ($^X, 'perl', 'perl5', "perl$]") {
-          PATH_COMPONENT: foreach $component (File::Spec->path(),
-                                                $Config::Config{'binexp'}) {
-                next unless defined($component) && $component;
-                my($abs) = File::Spec->catfile($component,$perl_name);
-                if (MM->maybe_command($abs)) {
-                    $^X = $perl = $abs;
-                    last DIST_PERLNAME;
+    else {
+        my $exe = $Config::Config{exe_ext};
+        my @candidates = (
+            File::Spec->catfile($CPAN::iCwd,$^X),
+            $Config::Config{'perlpath'},
+        );
+        for my $perl_name ($^X, 'perl', 'perl5', "perl$]") {
+            for my $path (File::Spec->path(), $Config::Config{'binexp'}) {
+                if ( defined($path) && length $path && -d $path ) {
+                    my $perl = File::Spec->catfile($path,$perl_name);
+                    push @candidates, $perl;
+                    # try with extension if not provided already
+                    if ($^O eq 'VMS') {
+                        # VMS might have a file version at the end
+                        push @candidates, $perl . $exe
+                            unless $perl =~ m/$exe(;\d+)?$/i;
+                    } elsif (defined $exe && length $exe) {
+                        push @candidates, $perl . $exe
+                            unless $perl =~ m/$exe$/i;
+                    }
                 }
             }
         }
+        for my $perl ( @candidates ) {
+            if (MM->maybe_command($perl) && _perl_is_same($perl)) {
+                $^X = $perl;
+                return $perl;
+            }
+        }
     }
-    return $perl;
+    return $^X; # default fall back
 }
 
-
 #-> sub CPAN::exists ;
 sub exists {
     my($mgr,$class,$id) = @_;
diff --git a/cpan/CPAN/lib/CPAN/Distribution.pm 
b/cpan/CPAN/lib/CPAN/Distribution.pm
index eeca99c..1d9015c 100644
--- a/cpan/CPAN/lib/CPAN/Distribution.pm
+++ b/cpan/CPAN/lib/CPAN/Distribution.pm
@@ -3,6 +3,7 @@ use strict;
 use Cwd qw(chdir);
 use CPAN::Distroprefs;
 use CPAN::InfoObj;
+use File::Path ();
 @CPAN::Distribution::ISA = qw(CPAN::InfoObj);
 use vars qw($VERSION);
 $VERSION = "1.9600";
@@ -501,6 +502,10 @@ See also 
http://rt.cpan.org/Ticket/Display.html?id=38932\n";);
             $from_dir = File::Spec->curdir;
             @dirents = @readdir;
         }
+        eval { File::Path::mkpath $builddir; };
+        if ($@) {
+            $CPAN::Frontend->mydie("Cannot create directory $builddir: $@");
+        }
         $packagedir = File::Temp::tempdir(
                                           "$tdir_base-XXXXXX",
                                           DIR => $builddir,
@@ -586,6 +591,7 @@ sub parse_meta_yml {
     my $early_yaml;
     eval {
         $CPAN::META->has_inst("Parse::CPAN::Meta") or die;
+        die "Parse::CPAN::Meta yaml too old" unless 
$Parse::CPAN::Meta::VERSION >= "1.40";
         # P::C::M returns last document in scalar context
         $early_yaml = Parse::CPAN::Meta::LoadFile($yaml);
     };
@@ -844,12 +850,20 @@ sub try_download {
                 my $readfh = CPAN::Tarzip->TIEHANDLE($patch);
 
                 my $pcommand;
-                my $ppp = $self->_patch_p_parameter($readfh);
+                my($ppp,$pfiles) = $self->_patch_p_parameter($readfh);
                 if ($ppp eq "applypatch") {
                     $pcommand = "$CPAN::Config->{applypatch} -verbose";
                 } else {
                     my $thispatchargs = join " ", $stdpatchargs, $ppp;
                     $pcommand = "$patchbin $thispatchargs";
+                    require Config; # usually loaded from CPAN.pm
+                    if ($Config::Config{osname} eq "solaris") {
+                        # native solaris patch cannot patch readonly files
+                        for my $file (@{$pfiles||[]}) {
+                            my @stat = stat $file or next;
+                            chmod $stat[2] | 0600, $file; # may fail
+                        }
+                    }
                 }
 
                 $readfh = CPAN::Tarzip->TIEHANDLE($patch); # open again
@@ -880,10 +894,14 @@ sub try_download {
     }
 }
 
+# may return
+# - "applypatch"
+# - ("-p0"|"-p1", $files)
 sub _patch_p_parameter {
     my($self,$fh) = @_;
     my $cnt_files   = 0;
     my $cnt_p0files = 0;
+    my @files;
     local($_);
     while ($_ = $fh->READLINE) {
         if (
@@ -895,13 +913,15 @@ sub _patch_p_parameter {
         }
         next unless /^[\*\+]{3}\s(\S+)/;
         my $file = $1;
+        push @files, $file;
         $cnt_files++;
         $cnt_p0files++ if -f $file;
         
CPAN->debug("file[$file]cnt_files[$cnt_files]cnt_p0files[$cnt_p0files]")
             if $CPAN::DEBUG;
     }
     return "-p1" unless $cnt_files;
-    return $cnt_files==$cnt_p0files ? "-p0" : "-p1";
+    my $opt_p = $cnt_files==$cnt_p0files ? "-p0" : "-p1";
+    return ($opt_p, \...@files);
 }
 
 #-> sub CPAN::Distribution::_edge_cases
@@ -2436,7 +2456,7 @@ sub follow_prereqs {
 of modules we are processing right now?", "yes");
         $follow = $answer =~ /^\s*y/i;
     } else {
-        my @prereq = map { $_=>[0] } @good_prereq_tuples;
+        my @prereq = map { $_->[0] } @good_prereq_tuples;
         local($") = ", ";
         $CPAN::Frontend->
             myprint("  Ignoring dependencies on modules @prereq\n");
diff --git a/cpan/CPAN/lib/CPAN/FTP.pm b/cpan/CPAN/lib/CPAN/FTP.pm
index 7338699..c1b7b20 100644
--- a/cpan/CPAN/lib/CPAN/FTP.pm
+++ b/cpan/CPAN/lib/CPAN/FTP.pm
@@ -14,7 +14,7 @@ use vars qw($connect_to_internet_ok $Ua $Thesite $ThesiteURL 
$Themethod);
 use vars qw(
             $VERSION
 );
-$VERSION = "5.5004";
+$VERSION = "5.5005";
 
 #-> sub CPAN::FTP::ftp_statistics
 # if they want to rewrite, they need to pass in a filehandle
@@ -576,13 +576,16 @@ sub hostdleasy { #called from hostdlxxx
                     $ThesiteURL = $ro_url;
                     return $ungz;
                 }
-                else {
+                elsif (-f $l && -r _) {
                     eval { CPAN::Tarzip->new($l)->gunzip($aslocal) };
-                    if ( -f $aslocal) {
+                    if ( -f $aslocal && -s _) {
                         $ThesiteURL = $ro_url;
                         return $aslocal;
                     }
-                    else {
+                    elsif (! -s $aslocal) {
+                        unlink $aslocal;
+                    }
+                    elsif (-f $l) {
                         $CPAN::Frontend->mywarn("Error decompressing '$l': 
$...@\n")
                             if $@;
                         return;
diff --git a/cpan/CPAN/lib/CPAN/FirstTime.pm b/cpan/CPAN/lib/CPAN/FirstTime.pm
index 53ffbf1..b7a258e 100644
--- a/cpan/CPAN/lib/CPAN/FirstTime.pm
+++ b/cpan/CPAN/lib/CPAN/FirstTime.pm
@@ -496,14 +496,14 @@ improves the overall quality and value of CPAN.
 
 One way you can contribute is to send test results for each module
 that you install.  If you install the CPAN::Reporter module, you have
-the option to automatically generate and email test reports to CPAN
+the option to automatically generate and deliver test reports to CPAN
 Testers whenever you run tests on a CPAN package.
 
 See the CPAN::Reporter documentation for additional details and
-configuration settings.  If your firewall blocks outgoing email,
-you will need to configure CPAN::Reporter before sending reports.
+configuration settings.  If your firewall blocks outgoing traffic,
+you may need to configure CPAN::Reporter before sending reports.
 
-Email test reports if CPAN::Reporter is installed (yes/no)?
+Generate test reports if CPAN::Reporter is installed (yes/no)?
 
 =item perl5lib_verbosity
 
diff --git a/cpan/CPAN/lib/CPAN/Queue.pm b/cpan/CPAN/lib/CPAN/Queue.pm
index 58d6911..e15a036 100644
--- a/cpan/CPAN/lib/CPAN/Queue.pm
+++ b/cpan/CPAN/lib/CPAN/Queue.pm
@@ -67,7 +67,7 @@ package CPAN::Queue;
 # in CPAN::Distribution::rematein.
 
 use vars qw{ @All $VERSION };
-$VERSION = "5.5";
+$VERSION = "5.5001";
 
 # CPAN::Queue::queue_item ;
 sub queue_item {
@@ -119,7 +119,7 @@ sub jumpqueue {
     }
     my $inherit_reqtype = $what[0]{reqtype} =~ /^(c|r)$/ ? "r" : "b";
   WHAT: for my $what_tuple (@what) {
-        my($what,$reqtype) = @$what_tuple{qw(qmod reqtype)};
+        my($qmod,$reqtype) = @$what_tuple{qw(qmod reqtype)};
         if ($reqtype eq "r"
             &&
             $inherit_reqtype eq "b"
@@ -128,26 +128,16 @@ sub jumpqueue {
         }
         my $jumped = 0;
         for (my $i=0; $i<$#All;$i++) { #prevent deep recursion
-            # CPAN->debug("i[$i]this[$All[$i]{qmod}]what[$what]") if 
$CPAN::DEBUG;
-            if ($All[$i]{qmod} eq $what) {
+            if ($All[$i]{qmod} eq $qmod) {
                 $jumped++;
-                if ($jumped >= 50) {
-                    die "PANIC: object[$what] 50 instances on the queue, looks 
like ".
-                        "some recursiveness has hit";
-                } elsif ($jumped > 25) { # one's OK if e.g. just processing
-                                    # now; more are OK if user typed
-                                    # it several times
-                    my $sleep = sprintf "%.1f", $jumped/10;
-                    $CPAN::Frontend->mywarn(
-qq{Warning: Object [$what] queued $jumped times, sleeping $sleep secs!\n}
-                    );
-                    $CPAN::Frontend->mysleep($sleep);
-                    # next WHAT;
-                }
             }
         }
+        # high jumped values are normal for popular modules when
+        # dealing with large bundles: XML::Simple,
+        # namespace::autoclean, UNIVERSAL::require
+        CPAN->debug("qmod[$qmod]jumped[$jumped]") if $CPAN::DEBUG;
         my $obj = "$class\::Item"->new(
-                                       qmod => $what,
+                                       qmod => $qmod,
                                        reqtype => $reqtype
                                       );
         unshift @All, $obj;
diff --git a/cpan/CPAN/lib/CPAN/Shell.pm b/cpan/CPAN/lib/CPAN/Shell.pm
index 91cbdd2..285ffc5 100644
--- a/cpan/CPAN/lib/CPAN/Shell.pm
+++ b/cpan/CPAN/lib/CPAN/Shell.pm
@@ -1456,6 +1456,7 @@ sub print_ornamented {
 
     local $| = 1; # Flush immediately
     if ( $CPAN::Be_Silent ) {
+        # WARNING: variable Be_Silent is poisoned and must be eliminated.
         print {report_fh()} $what;
         return;
     }
diff --git a/cpan/CPAN/lib/CPAN/Version.pm b/cpan/CPAN/lib/CPAN/Version.pm
index da876aa..43aaa1c 100644
--- a/cpan/CPAN/lib/CPAN/Version.pm
+++ b/cpan/CPAN/lib/CPAN/Version.pm
@@ -2,7 +2,7 @@ package CPAN::Version;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = "5.5";
+$VERSION = "5.5001";
 
 # CPAN::Version::vcmp courtesy Jost Krieger
 sub vcmp {
@@ -57,7 +57,7 @@ sub vgt {
 
 sub vlt {
     my($self,$l,$r) = @_;
-    0 + ($self->vcmp($l,$r) < 0);
+    $self->vcmp($l,$r) < 0;
 }
 
 sub vge {
@@ -67,7 +67,7 @@ sub vge {
 
 sub vle {
     my($self,$l,$r) = @_;
-    0 + ($self->vcmp($l,$r) <= 0);
+    $self->vcmp($l,$r) <= 0;
 }
 
 sub vstring {
diff --git a/cpan/CPAN/scripts/cpan b/cpan/CPAN/scripts/cpan
old mode 100644
new mode 100755
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index c79c184..17f06b2 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -268,6 +268,10 @@ Updated to use bzip2 1.0.6
 
 =item *
 
+C<CPAN> has been upgraded from version 1.94_57 to 1.94_61
+
+=item *
+
 C<Data::Dumper> has been upgraded from version 2.128 to 2.129.
 
 C<Dumpxs> no longer crashes with globs returned by C<*$io_ref>

--
Perl5 Master Repository

Reply via email to