Pārlūkot izejas kodu

scripts/package-metadata.pl: strip already selected conditions from dependencies

When a dependency is pulled in via conditional depends, and the condition
is already selected earlier in the chain, drop the condition.
This avoids some corner cases that trigger recursive dependencies.

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 2 gadi atpakaļ
vecāks
revīzija
ae88f00357
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      scripts/package-metadata.pl

+ 2 - 0
scripts/package-metadata.pl

@@ -160,6 +160,8 @@ sub mconf_depends {
 		$depend =~ s/^([@\+]+)// and $flags = $1;
 		my $condition = $parent_condition;
 
+		$depend = $2 if	$depend =~ /^(.+):(.+)$/ and $dep->{$1} eq 'select';
+
 		next if $condition eq $depend;
 		next if $seen->{"$parent_condition:$depend"};
 		next if $seen->{":$depend"};