X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/e240cc0ea62aa7404ccf6187cc95cf6370212bef..9cff4857fce61eadff4e4291f0b9613754f5b4b1:/scripts/gen_deps.pl?ds=sidebyside diff --git a/scripts/gen_deps.pl b/scripts/gen_deps.pl index d75f06d6f..de8572c76 100755 --- a/scripts/gen_deps.pl +++ b/scripts/gen_deps.pl @@ -22,7 +22,7 @@ while ($line = <>) { $line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do { $pkg{$name}->{depends} ||= []; foreach my $v (split /\s+/, $2) { - next if $v =~ /^@/; + next if $v =~ /^[\+]?@/; $v =~ s/^\+//; push @{$pkg{$name}->{depends}}, $v; } @@ -38,8 +38,8 @@ foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { my $depline = ""; foreach my $dep (@{$pkg{$name}->{depends}}) { my $idx; - if (defined $pkg{$dep}->{src} && $pkg{$name}->{src} ne $pkg{$dep}->{src}) { - $idx = $pkg{$dep}->{src}; + if (defined $pkg{$dep}->{src}) { + ($pkg{$name}->{src} ne $pkg{$dep}->{src}) and $idx = $pkg{$dep}->{src}; } elsif (defined $pkg{$dep}) { $idx = $dep; }