Ignore:
Timestamp:
2008-10-04T18:22:24+02:00 (8 years ago)
Author:
nbd
Message:

fix infinite recursion in metadata.pl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/metadata.pl

    r12820 r12851  
    368368        my $res; 
    369369        my $dep = shift; 
     370        my $seen = shift; 
    370371        $dep or $dep = {}; 
     372        $seen or $seen = {}; 
    371373 
    372374        $depends or return; 
     
    383385                        $depend = $2; 
    384386                } 
     387                next if $seen->{$depend}; 
     388                $seen->{$depend} = 1; 
    385389                if ($vdep = $package{$depend}->{vdepends}) { 
    386390                        $depend = join("||", map { "PACKAGE_".$_ } @$vdep); 
     
    391395                                # will not be checked. To fix this, we simply emit all of FOO's 
    392396                                # depends here as well. 
    393                                 $package{$depend} and mconf_depends($package{$depend}->{depends}, 1, $dep); 
     397                                $package{$depend} and mconf_depends($package{$depend}->{depends}, 1, $dep, $seen); 
    394398 
    395399                                $m = "select"; 
Note: See TracChangeset for help on using the changeset viewer.