[OpenWrt-Devel] [PATCH 2/2] scripts/package-metadata.pl: prefer $vdep with the same name as $depend

Yousong Zhou yszhou4tech at gmail.com
Wed Sep 5 11:40:36 EDT 2018


The need arises when userspace package "openvswitch" selects
"kmod-openvswitch" which will be provided by both "kmod-openvswitch" and
"kmod-openvswitch-intree".  In this case, we want it to prefer the
package with the same name as with virtual package

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 scripts/package-metadata.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 53bb45a62c..54c1a5dc9f 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -181,7 +181,7 @@ sub mconf_depends {
 
 				foreach my $v (@$vdep) {
 					next if $v->{buildonly};
-					if ($v->{variant_default}) {
+					if ($v->{variant_default} || $v->{name} eq $depend) {
 						unshift @vdeps, $v->{name};
 					} else {
 						push @vdeps, $v->{name};

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list