{
open my $eb, '>', $file or return $FAIL->("open($file): $!");
- print $eb $self->ebuild_source;
+ my $source = $self->ebuild_source;
+ return $FAIL->() unless defined $source;
+ print $eb $source;
}
return $FAIL->() if $stat->do_manifest and not $self->update_manifest;
=head2 C<ebuild_source>
-Returns the source of the ebuild for the current dist object.
+Returns the source of the ebuild for the current dist object, or C<undef> when one of the dependencies couldn't be mapped to an existing ebuild.
=cut
# We must resolve the deps now and not inside prepare because _cpan2portage
# has to see the ebuilds already generated for the dependencies of the current
# dist.
- my @deps = do {
- my %seen;
- sort grep !$seen{$_}++, 'dev-lang/perl',
- map $self->_cpan2portage(@$_), @{$stat->deps}
- };
+ my @deps;
+ for (@{$stat->deps}) {
+ my $dep = $self->_cpan2portage(@$_);
+ return unless defined $dep;
+ push @deps, $dep;
+ }
+
+ @deps = do { my %seen; sort grep !$seen{$_}++, 'dev-lang/perl', @deps };
my $d = $stat->header;
$d .= "# Generated by CPANPLUS::Dist::Gentoo version $VERSION\n\n";
}
- $self->_skip(
+ $self->_abort(
"Couldn't find an appropriate ebuild for $name in the portage tree"
);
- return '';
+ return;
}
sub install {