diff mbox series

[OpenWrt-Devel,1/2] scripts/metadata.pm: avoid adding dup names in provides list

Message ID 20180905154036.24318-1-yszhou4tech@gmail.com
State Accepted, archived
Delegated to: Yousong Zhou
Headers show
Series [OpenWrt-Devel,1/2] scripts/metadata.pm: avoid adding dup names in provides list | expand

Commit Message

Yousong Zhou Sept. 5, 2018, 3:40 p.m. UTC
The need arises from building Open vSwitch kernel datapath modules, e.g.

 - kmod-openvswitch from Linux upstream
 - kmod-openvswitch-intree from openvswitch source code

where both provides virtual package "kmod-openvswitch" for userspace
packages to select and depend on

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
---
 scripts/metadata.pm | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index e05e400991..4a5464edc0 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -250,6 +250,7 @@  sub parse_package_metadata($) {
 			my @vpkg = split /\s+/, $1;
 			@{$pkg->{provides}} = ($pkg->{name}, @vpkg);
 			foreach my $vpkg (@vpkg) {
+				next if ($vpkg eq $pkg->{name});
 				$vpackage{$vpkg} or $vpackage{$vpkg} = [];
 				push @{$vpackage{$vpkg}}, $pkg;
 			}