From ae88f00357c8d9b616bc034b1f266340f6bef3e3 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 1 Sep 2023 19:26:29 +0200 Subject: [PATCH] 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 --- scripts/package-metadata.pl | 2 ++ 1 file changed, 2 insertions(+) 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"}; -- GitLab