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 <nbd@nbd.name>
$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"};