summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-10-26 14:41:47 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-10-26 14:42:48 +0100
commit07be2aceb8f7f85f78ffa812b42b93d38d740bcb (patch)
tree8de708ba71bd9a1f942b9a32aa4d3ab3678ea881 /cpan
parenta50d6ed0a23b68b97ff8aac166442b08a17d34fd (diff)
downloadperl-07be2aceb8f7f85f78ffa812b42b93d38d740bcb.tar.gz
Update CPAN to CPAN version 1.94_62
[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)
Diffstat (limited to 'cpan')
-rw-r--r--cpan/CPAN/Changes13
-rw-r--r--cpan/CPAN/lib/CPAN.pm2
-rw-r--r--cpan/CPAN/lib/CPAN/Distribution.pm65
-rw-r--r--cpan/CPAN/lib/CPAN/LWP/UserAgent.pm10
-rw-r--r--cpan/CPAN/lib/CPAN/Queue.pm21
5 files changed, 93 insertions, 18 deletions
diff --git a/cpan/CPAN/Changes b/cpan/CPAN/Changes
index ac8b97a2cb..50c73ca188 100644
--- a/cpan/CPAN/Changes
+++ b/cpan/CPAN/Changes
@@ -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
diff --git a/cpan/CPAN/lib/CPAN.pm b/cpan/CPAN/lib/CPAN.pm
index 3d2859af6a..793d4a4ec8 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_61';
+$CPAN::VERSION = '1.94_62';
$CPAN::VERSION =~ s/_//;
# we need to run chdir all over and we would get at wrong libraries
diff --git a/cpan/CPAN/lib/CPAN/Distribution.pm b/cpan/CPAN/lib/CPAN/Distribution.pm
index 1d9015cf71..8d6fd10ce9 100644
--- a/cpan/CPAN/lib/CPAN/Distribution.pm
+++ b/cpan/CPAN/lib/CPAN/Distribution.pm
@@ -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";
diff --git a/cpan/CPAN/lib/CPAN/LWP/UserAgent.pm b/cpan/CPAN/lib/CPAN/LWP/UserAgent.pm
index 7bb86f9a15..2e5c8c6c3d 100644
--- a/cpan/CPAN/lib/CPAN/LWP/UserAgent.pm
+++ b/cpan/CPAN/lib/CPAN/LWP/UserAgent.pm
@@ -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
diff --git a/cpan/CPAN/lib/CPAN/Queue.pm b/cpan/CPAN/lib/CPAN/Queue.pm
index e15a036e93..e5d88ce2d8 100644
--- a/cpan/CPAN/lib/CPAN/Queue.pm
+++ b/cpan/CPAN/lib/CPAN/Queue.pm
@@ -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__