diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-06-23 19:28:16 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-06-23 19:28:16 +0000 |
commit | 8d146101a3a76a61ac093017b8f795a833f2a9b1 (patch) | |
tree | 5de9d8c1258b4e9a58d597a1adaad17b1af6c499 | |
parent | b6b061ea225f8159c7787d332edb5efd1a2e4b0a (diff) |
[scripts] metadata.pl: fix handling of multiple conditional depends that reference the same package (exposed by previous hotplug2 changes), also kill duplicate dependency specs while we're at it
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27267 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-x | scripts/metadata.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl index 7208e16a98..246520bf78 100755 --- a/scripts/metadata.pl +++ b/scripts/metadata.pl @@ -696,10 +696,10 @@ sub gen_package_mk() { my $depstr = "\$(curdir)/$idx$suffix/compile"; my $depline = get_conditional_dep($condition, $depstr); if ($depline) { - $deplines{$dep} = $depline; + $deplines{$depline}++; } } - my $depline = join(" ", values %deplines); + my $depline = join(" ", sort keys %deplines); if ($depline) { $line .= "\$(curdir)/".$pkg->{subdir}."$pkg->{src}/$type/compile += $depline\n"; } @@ -756,12 +756,12 @@ sub gen_package_mk() { } $depline = get_conditional_dep($condition, $depstr); if ($depline) { - $deplines{$idx.$dep} = $depline; + $deplines{$depline}++; } } } } - my $depline = join(" ", values %deplines); + my $depline = join(" ", sort keys %deplines); if ($depline) { $line .= "\$(curdir)/".$pkg->{subdir}."$pkg->{src}/compile += $depline\n"; } |