diff options
author | Felix Fietkau <nbd@nbd.name> | 2023-09-01 12:14:26 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-09-01 12:18:13 +0200 |
commit | 6c3eff9dd8bb8d0f268e8a0dbedbc6a33bdac796 (patch) | |
tree | 1996c94e90eb9dd03a04a12c0cdeffdc1f7f56c7 /scripts | |
parent | 821cf6dd385ee784f06ec33202ca4df7f475b13a (diff) | |
download | openwrt-6c3eff9dd8bb8d0f268e8a0dbedbc6a33bdac796.tar.gz openwrt-6c3eff9dd8bb8d0f268e8a0dbedbc6a33bdac796.tar.bz2 openwrt-6c3eff9dd8bb8d0f268e8a0dbedbc6a33bdac796.zip |
scripts/package-metadata.pl: fix handling transitive conditional dependencies
When a package foo depends on PACKAGE_foo:bar (in order to make build
dependencies conditional), tracking transitive dependencies can fail because
the internal seen flag is checked/set before eliminating the fake conditional
dependency. This can show up as a depends on not properly turned into a
select further down in the dependency chain
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/package-metadata.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 6288584d65..11f1bc4bcd 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -161,9 +161,6 @@ sub mconf_depends { my $condition = $parent_condition; next if $condition eq $depend; - next if $seen->{"$parent_condition:$depend"}; - next if $seen->{":$depend"}; - $seen->{"$parent_condition:$depend"} = 1; if ($depend =~ /^(.+):(.+)$/) { if ($1 ne "PACKAGE_$pkgname") { if ($condition) { @@ -174,6 +171,9 @@ sub mconf_depends { } $depend = $2; } + next if $seen->{"$parent_condition:$depend"}; + next if $seen->{":$depend"}; + $seen->{"$parent_condition:$depend"} = 1; if ($flags =~ /\+/) { my $vdep = $vpackage{$depend}; if ($vdep) { |