Revert "scripts/package-metadata.pl: fix handling transitive conditional dependencies"
authorFelix Fietkau <nbd@nbd.name>
Fri, 1 Sep 2023 16:34:36 +0000 (18:34 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 1 Sep 2023 16:34:58 +0000 (18:34 +0200)
This reverts commit 6c3eff9dd8bb8d0f268e8a0dbedbc6a33bdac796.
This appears to cause some regressions in generated config.
Will be replaced with a fixed version later

Signed-off-by: Felix Fietkau <nbd@nbd.name>
scripts/package-metadata.pl

index 3e9e4e986e9f7ad62e64c301bd3d7bee0a14238f..4b2f5c8bde61bf8fe651f90c56d82e8360e3b93c 100755 (executable)
@@ -161,6 +161,9 @@ 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) {
@@ -171,9 +174,6 @@ 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) {