X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=43260ba904ade5fadbe969ff9bfc2ca8f4e2373d;hb=afb044f01dfbb8113137ed467e8c68c6748f1625;hp=86a9d0c5215686d811998e21ac6704d66cbf608c;hpb=2172d3b55ca22e03bf4efaac81e91e64e67d80fa;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 86a9d0c..43260ba 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -40,6 +40,10 @@ This module is a CPANPLUS backend that recursively generates Gentoo ebuilds for The generated ebuilds are placed into the section C. They favour depending on C or C rather than C. +=head1 INSTALLATION + +After installing this module, you should append C to your F file. + =head1 METHODS All the methods are inherited from L. Please refer to its perldoc for precise information on what's done at each step. @@ -69,11 +73,13 @@ sub init { } my %gentooism = ( - 'Digest' => 'digest-base', - 'Locale-Maketext' => 'locale-maketext', - 'Net-Ping' => 'net-ping', - 'PathTools' => 'File-Spec', - 'PodParser' => 'Pod-Parser', + 'Digest' => 'digest-base', + 'Locale-Maketext' => 'locale-maketext', + 'Net-Ping' => 'net-ping', + 'PathTools' => 'File-Spec', + 'PodParser' => 'Pod-Parser', + 'Set-Scalar' => 'set-scalar', + 'Tie-EncryptedHash' => 'tie-encryptedhash', ); sub prepare { @@ -143,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'; @@ -230,8 +237,10 @@ 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) = run command => [ 'ebuild', $file, 'manifest' ], + verbose => 0; + unless ($success) { + error "$errmsg -- aborting"; 1 while unlink $file; return 0; } @@ -249,8 +258,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; } @@ -266,8 +277,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; } @@ -292,6 +305,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.