2
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
ae88f00357

+ 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"};