Update CPAN to CPAN version 1.94_62
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Tue, 26 Oct 2010 13:41:47 +0000 (14:41 +0100)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Tue, 26 Oct 2010 13:42:48 +0000 (14:42 +0100)
  [DELTA]

  2010-10-26  Andreas J. Koenig  <andk@cpan.org>

        * release 1.94_62

        * address RT #62064: build_requires_install_policy set to "no" did not
        work correctly (reported by Xavier Bergade)

        * address RT ##55091: don't ask the proxy credentials if proxy_user
        empty (fixed by Robert Bohne)

        * address RT #55093: no_proxy doesn't work with more then one entries
        (fixed by Robert Bohne)

Porting/Maintainers.pl
cpan/CPAN/Changes
cpan/CPAN/lib/CPAN.pm
cpan/CPAN/lib/CPAN/Distribution.pm
cpan/CPAN/lib/CPAN/LWP/UserAgent.pm
cpan/CPAN/lib/CPAN/Queue.pm
pod/perldelta.pod

index 9cf7391acb0a3f29b156e63af3b1cefe3180bffc..96f9625d7efe09c99e6acf6fc3c56d0c5e115322 100755 (executable)
@@ -356,7 +356,7 @@ use File::Glob qw(:case);
     'CPAN' =>
        {
        'MAINTAINER'    => 'andk',
-       'DISTRIBUTION'  => 'ANDK/CPAN-1.94_61.tar.gz',
+       'DISTRIBUTION'  => 'ANDK/CPAN-1.94_62.tar.gz',
        'FILES'         => q[cpan/CPAN],
        'EXCLUDED'      => [ qr{^distroprefs/},
                             qr{^inc/Test/},
index ac8b97a2cb15aaad3b21fad6dd4c5a2f443392ea..50c73ca18807c5ee08bbeda2452f0abd6242ca79 100644 (file)
@@ -1,3 +1,16 @@
+2010-10-26  Andreas J. Koenig  <andk@cpan.org>
+
+       * release 1.94_62
+
+       * address RT #62064: build_requires_install_policy set to "no" did not
+       work correctly (reported by Xavier Bergade)
+
+       * address RT ##55091: don't ask the proxy credentials if proxy_user
+       empty (fixed by Robert Bohne)
+
+       * address RT #55093: no_proxy doesn't work with more then one entries
+       (fixed by Robert Bohne)
+
 2010-10-03  Andreas J. Koenig  <andk@cpan.org>
 
        * release 1.94_61
index 3d2859af6aebd1509d07df55e61cf6c907571168..793d4a4ec87527a148b8a93f9591b20f6e8600ae 100644 (file)
@@ -2,7 +2,7 @@
 # vim: ts=4 sts=4 sw=4:
 use strict;
 package CPAN;
-$CPAN::VERSION = '1.94_61';
+$CPAN::VERSION = '1.94_62';
 $CPAN::VERSION =~ s/_//;
 
 # we need to run chdir all over and we would get at wrong libraries
index 1d9015cf7130ed852f312131be8c1186b1283950..8d6fd10ce94a1d3e45c28503316316f9277c650b 100644 (file)
@@ -650,14 +650,15 @@ sub satisfy_configure_requires {
     if ($self->{configure_requires_later}) {
         for my $k (keys %{$self->{configure_requires_later_for}||{}}) {
             if ($self->{configure_requires_later_for}{$k}>1) {
-                # we must not come here a second time
-                $CPAN::Frontend->mywarn("Panic: Some prerequisites is not available, please investigate...");
-                require YAML::Syck;
-                $CPAN::Frontend->mydie
-                    (
-                     YAML::Syck::Dump
-                     ({self=>$self, prereq=>\@prereq})
-                    );
+                my $type = "";
+                for my $p (@prereq) {
+                    if ($p->[0] eq $k) {
+                        $type = $p->[1];
+                    }
+                }
+                $type = " $type" if $type;
+                $CPAN::Frontend->mywarn("Warning: unmanageable(?) prerequisite $k$type");
+                sleep 1;
             }
         }
     }
@@ -2418,8 +2419,19 @@ sub follow_prereqs {
     return unless @prereq_tuples;
     my(@good_prereq_tuples);
     for my $p (@prereq_tuples) {
-        # XXX watch out for foul ones
-        push @good_prereq_tuples, $p;
+        # promote if possible
+        if ($p->[1] =~ /^(r|c)$/) {
+            push @good_prereq_tuples, $p;
+        } elsif ($p->[1] =~ /^(b)$/) {
+            my $reqtype = CPAN::Queue->reqtype_of($p->[0]);
+            if ($reqtype =~ /^(r|c)$/) {
+                push @good_prereq_tuples, [$p->[0], $reqtype];
+            } else {
+                push @good_prereq_tuples, $p;
+            }
+        } else {
+            die "Panic: in follow_prereqs: reqtype[$p->[1]] seen, should never happen";
+        }
     }
     my $pretty_id = $self->pretty_id;
     my %map = (
@@ -2614,6 +2626,19 @@ sub unsat_prereq {
         if ( $available_file ) {
             if  ( $inst_file && $available_file eq $inst_file && $nmo->inst_deprecated ) {
                 # continue installing as a prereq
+            } elsif ($self->{reqtype} =~ /^(r|c)$/ && exists $prereq_pm->{requires}{$need_module} && $nmo && !$inst_file) {
+                # continue installing as a prereq; this may be a
+                # distro we already used when it was a build_requires
+                # so we did not install it. But suddenly somebody
+                # wants it as a requires
+                my $need_distro = $nmo->distribution;
+                if ($need_distro->{install} && $need_distro->{install}->failed && $need_distro->{install}->text =~ /is only/) {
+                    CPAN->debug("promotion from build_requires to requires") if $CPAN::DEBUG;
+                    delete $need_distro->{install}; # promote to another installation attempt
+                    $need_distro->{reqtype} = "r";
+                    $need_distro->install;
+                    next NEED;
+                }
             }
             else {
                 next NEED if $self->_fulfills_all_version_rqs(
@@ -2720,8 +2745,13 @@ sub unsat_prereq {
         } elsif (exists $prereq_pm->{requires}{$need_module}) {
             $needed_as = "r";
         } elsif ($slot eq "configure_requires_later") {
-            # we have not yet run the {Build,Makefile}.PL, we must presume "r"
-            $needed_as = "r";
+            # in ae872487d5 we said: C< we have not yet run the
+            # {Build,Makefile}.PL, we must presume "r" >; but the
+            # meta.yml standard says C< These dependencies are not
+            # required after the distribution is installed. >; so now
+            # we change it back to "b" and care for the proper
+            # promotion later.
+            $needed_as = "b";
         } else {
             $needed_as = "b";
         }
@@ -2861,6 +2891,7 @@ sub prereq_pm {
             my $areq;
             my $do_replace;
             while (my($k,$v) = each %{$req||{}}) {
+                next unless defined $v;
                 if ($v =~ /\d/) {
                     $areq->{$k} = $v;
                 } elsif ($k =~ /[A-Za-z]/ &&
@@ -3393,13 +3424,15 @@ sub install {
             }
         }
         if (exists $self->{install}) {
-            if (UNIVERSAL::can($self->{install},"text") ?
-                $self->{install}->text eq "YES" :
-                $self->{install} =~ /^YES/
-               ) {
+            my $text = UNIVERSAL::can($self->{install},"text") ?
+                $self->{install}->text :
+                    $self->{install};
+            if ($text =~ /^YES/) {
                 $CPAN::Frontend->myprint("  Already done\n");
                 $CPAN::META->is_installed($self->{build_dir});
                 return 1;
+            } elsif ($text =~ /is only/) {
+                push @e, $text;
             } else {
                 # comment in Todo on 2006-02-11; maybe retry?
                 push @e, "Already tried without success";
index 7bb86f9a15deee51dd4770afd595fcc64022cfeb..2e5c8c6c3d217c8f9ee5ab74ccee8420576f2e43 100644 (file)
@@ -34,7 +34,9 @@ sub get_basic_credentials {
 sub get_proxy_credentials {
     my $self = shift;
     my ($user, $password);
-    if ( defined $CPAN::Config->{proxy_user} ) {
+    if ( defined $CPAN::Config->{proxy_user}
+            && $CPAN::Config->{proxy_user}
+    ) {
         $user = $CPAN::Config->{proxy_user};
         $password = $CPAN::Config->{proxy_pass} || "";
         return ($user, $password);
@@ -91,6 +93,12 @@ sub _get_username_and_password_from_user {
     return ($username,$password);
 }
 
+
+sub no_proxy {
+    my ( $self, $no_proxy ) = @_;
+    return $self->SUPER::no_proxy( split(',',$no_proxy) );
+}
+
 # mirror(): Its purpose is to deal with proxy authentication. When we
 # call SUPER::mirror, we relly call the mirror method in
 # LWP::UserAgent. LWP::UserAgent will then call
index e15a036e93db7b708a12ff311572b02ea6d2e4aa..e5d88ce2d83832342f8dcb0287325e25df8f336a 100644 (file)
@@ -176,6 +176,27 @@ sub size {
     return scalar @All;
 }
 
+sub reqtype_of {
+    my($self,$mod) = @_;
+    my $best = "";
+    for my $item (grep { $_->{qmod} eq $mod } @All) {
+        my $c = $item->{reqtype};
+        if ($c eq "c") {
+            $best = $c;
+            last;
+        } elsif ($c eq "r") {
+            $best = $c;
+        } elsif ($c eq "b") {
+            if ($best eq "") {
+                $best = $c;
+            }
+        } else {
+            die "Panic: in reqtype_of: reqtype[$c] seen, should never happen";
+        }
+    }
+    return $best;
+}
+
 1;
 
 __END__
index f2ce5ed3742cfb278b28eb5365c338f4ce6c4718..36694509c8b8d8b51612c97e04ef391af7cb3ded 100644 (file)
@@ -140,6 +140,10 @@ L<[perl #75448]|http://rt.perl.org/rt3/Public/Bug/Display.html?id=75448>.
 
 =item *
 
+C<CPAN> has been upgraded from 1.94_61 to 1.94_62
+
+=item *
+
 C<Locale::Maketext> has been upgraded from 1.16 to 1.17
 
 =item *