diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-06-23 19:28:16 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-06-23 19:28:16 +0000 |
commit | e745fc762b7388202df2f7506ca1f562c9150197 (patch) | |
tree | 42bbab1ba8d01eaed6b680d655ca7cd1dfadc865 /scripts | |
parent | 67fc519a3d45db0418d84a6afcb3aa63ebea5a70 (diff) | |
download | mtk-20170518-e745fc762b7388202df2f7506ca1f562c9150197.zip mtk-20170518-e745fc762b7388202df2f7506ca1f562c9150197.tar.gz mtk-20170518-e745fc762b7388202df2f7506ca1f562c9150197.tar.bz2 |
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
SVN-Revision: 27267
Diffstat (limited to 'scripts')
-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 7208e16..246520b 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"; } |