X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=ad0976dfe636530c5a7626686a7c071a7084fa6a;hb=37d7baa5e5047f7564e5fd3878fb9d53bc37e14e;hp=37fbcae8db767b6881c674a691272c3555cb8e92;hpb=8a7263db5ef71756ac93c948bbaede0dbe6544bb;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 37fbcae..ad0976d 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -149,6 +149,7 @@ sub prepare { my $prereqs = $mod->status->prereqs; my @depends; for my $prereq (sort keys %$prereqs) { + next if $prereq =~ /^perl(?:-|\z)/; my $obj = $int->module_tree($prereq); unless ($obj) { error 'Wrong module object -- aborting'; @@ -175,6 +176,7 @@ sub prepare { sub create { my $self = shift; my $stat = $self->status; + my $conf = $self->parent->parent->configure_object; unless ($stat->prepared) { error 'Can\'t create ' . $stat->dist . ' since it was never prepared -- aborting'; @@ -236,8 +238,16 @@ sub create { } msg 'Adding Manifest entry for ' . $stat->dist; - unless (scalar run command => [ 'ebuild', $file, 'manifest' ], verbose => 0) { - error 'ebuild manifest failed -- aborting'; + my ($success, $errmsg, $output) = run + command => [ 'ebuild', $file, 'manifest' ], + verbose => 0; + unless ($success) { + error "$errmsg -- aborting"; + if (defined $output and $conf->get_conf('verbose')) { + my $msg = join '', @$output; + 1 while chomp $msg; + error $msg; + } 1 while unlink $file; return 0; } @@ -255,8 +265,10 @@ sub install { my @cmd = ('emerge', '=' . $stat->eb_name . '-' . $stat->eb_version); unshift @cmd, $sudo if $sudo; - unless (run command => \@cmd, verbose => 1) { - error 'emerge failed -- aborting'; + my ($success, $errmsg) = run command => \@cmd, + verbose => 1; + unless ($success) { + error "$errmsg -- aborting"; return 0; } @@ -272,8 +284,10 @@ sub uninstall { my @cmd = ('emerge', '-C', '=' . $stat->eb_name . '-' . $stat->eb_version); unshift @cmd, $sudo if $sudo; - unless (run command => \@cmd, verbose => 1) { - error 'emerge -C failed -- aborting'; + my ($success, $errmsg) = run command => \@cmd, + verbose => 1; + unless ($success) { + error "$errmsg -- aborting"; return 0; } @@ -298,6 +312,8 @@ L, L, L. Vincent Pit, C<< >>, L. +You can contact me by mail or on C (vincent). + =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.