X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=2952634100d8be7685d5cec49390f86ce781f050;hb=913b01f16346e5138e06f02d9c031e6a93a0e6c2;hp=3bc66a54e33b26ac96ae0d712f4be150d7a3cf7c;hpb=5a5575483b3f3ae59a3895e1a571edd687becec0;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 3bc66a5..2952634 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -85,7 +85,7 @@ Log in as root and unpack them in e.g. your home directory : Set up environment variables so that the toolchain is temporarily available : # export OLDPATH=$PATH - # export PATH=/root/CPANPLUS-Dist-Gentoo-0.08/bin:$PATH + # export PATH=/root/CPANPLUS-0.88/bin:$PATH # export PERL5LIB=/root/CPANPLUS-Dist-Gentoo-0.08/blib/lib:/root/CPANPLUS-0.88/lib:/root/CPANPLUS-0.88/inc/bundle Make sure you don't have an old C<.cpanplus> configuration visible : @@ -324,7 +324,7 @@ sub prepare { $stat->prepared(0); - $self->SUPER::prepare(%opts); + $self->SUPER::prepare(@_); return $FAIL->() unless $stat->prepared; @@ -566,20 +566,17 @@ sub _cpan2portage { "$name-*.ebuild", ) or next; - my @atoms = map CPANPLUS::Dist::Gentoo::Atom->new( - defined $version ? ( - ebuild => $_, - range => '>=', - ) : ( - category => $category, - name => $name, - ), - ), @ebuilds; + my $last = reduce { $a < $b ? $b : $a } # handles overloading + map CPANPLUS::Dist::Gentoo::Atom->new_from_ebuild($_), + @ebuilds; + next if defined $version and $last < $version; - my $atom = reduce { $a < $b ? $b : $a } @atoms; # handles overloading - next if defined $version and $atom < $version; - - return $atom; + return CPANPLUS::Dist::Gentoo::Atom->new( + category => $last->category, + name => $last->name, + (defined $version ? (version => $version, range => '>=') : ()), + ebuild => $last->ebuild, + ); } }