]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/commitdiff
Bail out if the SUPER calls to prepare/create failed
authorVincent Pit <vince@profvince.com>
Sun, 16 Aug 2009 20:19:32 +0000 (22:19 +0200)
committerVincent Pit <vince@profvince.com>
Sun, 16 Aug 2009 20:19:32 +0000 (22:19 +0200)
lib/CPANPLUS/Dist/Gentoo.pm

index 51f23d10df4345ac507bf3cefca18a8cd05fd24b..9cc12502252ccdbfb8cc707ebf3f25effe3b5aca 100644 (file)
@@ -249,9 +249,11 @@ sub prepare {
   }
  }
 
+ $stat->prepared(0);
+
  $self->SUPER::prepare(%opts);
 
$stat->prepared(0);
return $FAIL->() unless $stat->prepared;
 
  my $desc = $mod->description;
  ($desc = $name) =~ s/-+/::/g unless $desc;
@@ -368,6 +370,11 @@ sub create {
 
  $self->SUPER::create(@_);
 
+ unless ($stat->created) {
+  1 while unlink $file;
+  return $FAIL->();
+ }
+
  if ($stat->do_manifest and not $self->update_manifest) {
   1 while unlink $file;
   return $FAIL->();