From: Felix Fietkau Date: Fri, 1 Sep 2023 17:26:29 +0000 (+0200) Subject: scripts/package-metadata.pl: strip already selected conditions from dependencies X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ae88f00357c8d9b616bc034b1f266340f6bef3e3;p=openwrt%2Fstaging%2Fthess.git 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 --- diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 4b2f5c8bde..8d8a9fd306 100755 --- a/scripts/package-metadata.pl +++ b/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"};