$self->SUPER::create(@_);
- if ($stat->do_manifest) {
- unless (File::Copy::copy($stat->fetched_arch => $stat->distdir)) {
- error "Couldn\'t copy the distribution file to distdir ($!) -- aborting";
- 1 while unlink $file;
- return $FAIL->();
- }
-
- msg 'Adding Manifest entry for ' . $stat->distribution;
- unless ($self->_run([ 'ebuild', $file, 'manifest' ], 0)) {
- 1 while unlink $file;
- return $FAIL->();
- }
+ if ($stat->do_manifest and not $self->update_manifest) {
+ 1 while unlink $file;
+ return $FAIL->();
}
return $OK->();
}
+=head2 C<update_manifest>
+
+Update the F<Manifest> file for the ebuild associated to the current dist object.
+
+=cut
+
+sub update_manifest {
+ my $self = shift;
+ my $stat = $self->status;
+
+ my $file = $stat->eb_file;
+ unless ($file and -e $file) {
+ error 'The ebuild file is invalid or does not exist -- aborting';
+ return 0;
+ }
+
+ unless (File::Copy::copy($stat->fetched_arch => $stat->distdir)) {
+ error "Couldn\'t copy the distribution file to distdir ($!) -- aborting";
+ return 0;
+ }
+
+ msg 'Adding Manifest entry for ' . $stat->distribution;
+ return $self->_run([ 'ebuild', $stat->eb_file, 'manifest' ], 0);
+}
+
sub _cpan2portage {
my ($self, $name, $version) = @_;