summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2023-09-01 19:26:29 +0200
committerFelix Fietkau <nbd@nbd.name>2023-09-01 19:30:32 +0200
commitae88f00357c8d9b616bc034b1f266340f6bef3e3 (patch)
tree41ee2824db93fb7514e005c85f4bfabaf9add3b7 /scripts
parent6252c18d1cae2a0f94e6a4bd706b98b210cf8063 (diff)
downloadopenwrt-ae88f00357c8d9b616bc034b1f266340f6bef3e3.tar.gz
openwrt-ae88f00357c8d9b616bc034b1f266340f6bef3e3.tar.bz2
openwrt-ae88f00357c8d9b616bc034b1f266340f6bef3e3.zip
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 <nbd@nbd.name>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/package-metadata.pl2
1 files changed, 2 insertions, 0 deletions
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"};