]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/blobdiff - lib/CPANPLUS/Dist/Gentoo.pm
Prevent infinite loop when forcing a distribution with recursive dependencies
[perl/modules/CPANPLUS-Dist-Gentoo.git] / lib / CPANPLUS / Dist / Gentoo.pm
index e71c0410e1c3873c71348e06fad5daceffabbc03..3813281622e8996152ff02716ff825abab186a77 100644 (file)
@@ -21,11 +21,11 @@ CPANPLUS::Dist::Gentoo - CPANPLUS backend generating Gentoo ebuilds.
 
 =head1 VERSION
 
-Version 0.04
+Version 0.05
 
 =cut
 
-our $VERSION = '0.04';
+our $VERSION = '0.05';
 
 =head1 SYNOPSIS
 
@@ -61,6 +61,8 @@ my $default_keywords;
 my $default_distdir;
 my $main_portdir;
 
+my %forced;
+
 sub _unquote {
  my $s = shift;
  $s =~ s/^["']*//;
@@ -294,9 +296,10 @@ sub prepare {
 
  if (-e $file) {
   my $skip = 1;
-  if ($stat->force) {
+  if ($stat->force and not $forced{$file}) {
    if (-w $file) {
     1 while unlink $file;
+    $forced{$file} = 1;
     $skip = 0;
    } else {
     error "Can't force rewriting of $file -- skipping";