aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-08-04 12:17:26 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-08-04 12:17:26 +0000
commitef5da32acb849b27b5062a73e514ac225e4f4971 (patch)
tree032e893ee6739d9fb7c1469a979e60aa4182e848 /scripts
parente84c4d5b0a0a116bcd66cc154d35c7e9ad8ac2d8 (diff)
downloadmaster-187ad058-ef5da32acb849b27b5062a73e514ac225e4f4971.tar.gz
master-187ad058-ef5da32acb849b27b5062a73e514ac225e4f4971.tar.bz2
master-187ad058-ef5da32acb849b27b5062a73e514ac225e4f4971.zip
build: process transitive dependencies after local dependencies
This improves duplicate dependency detection Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37679 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/metadata.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 28ddefcd9c..498456ea4d 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -442,6 +442,7 @@ sub mconf_depends {
my $parent_condition = shift;
$dep or $dep = {};
$seen or $seen = {};
+ my @t_depends;
$depends or return;
my @depends = @$depends;
@@ -475,7 +476,7 @@ sub mconf_depends {
# thus if FOO depends on other config options, these dependencies
# will not be checked. To fix this, we simply emit all of FOO's
# depends here as well.
- $package{$depend} and mconf_depends($pkgname, $package{$depend}->{depends}, 1, $dep, $seen, $condition);
+ $package{$depend} and push @t_depends, [ $package{$depend}->{depends}, $condition ];
$m = "select";
next if $only_dep;
@@ -492,6 +493,11 @@ sub mconf_depends {
}
$dep->{$depend} =~ /select/ or $dep->{$depend} = $m;
}
+
+ foreach my $tdep (@t_depends) {
+ mconf_depends($pkgname, $tdep->[0], 1, $dep, $seen, $tdep->[1]);
+ }
+
foreach my $depend (keys %$dep) {
my $m = $dep->{$depend};
$res .= "\t\t$m $depend\n";