From: Vincent Pit Date: Sat, 29 Nov 2008 11:33:49 +0000 (+0100) Subject: Also print the output of the manifest command when it fails X-Git-Tag: v0.03~13 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git;a=commitdiff_plain;h=37d7baa5e5047f7564e5fd3878fb9d53bc37e14e Also print the output of the manifest command when it fails --- diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 43260ba..ad0976d 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -176,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'; @@ -237,10 +238,16 @@ sub create { } msg 'Adding Manifest entry for ' . $stat->dist; - my ($success, $errmsg) = run command => [ 'ebuild', $file, 'manifest' ], - verbose => 0; + 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; }