[OpenWrt-Devel] [PATCH 2/2] scripts/package-metadata.pl: prefer $vdep with the same name as $depend
Matthias Schiffer
mschiffer at universe-factory.net
Wed Sep 5 16:15:03 EDT 2018
On 9/5/18 5:40 PM, Yousong Zhou wrote:
> 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>
This patch should not be necessary: The implicit PROVIDES of a package name
by the package itself is handled by the "Package:" match, not the
"Provides:" match in metadata.pm, so the package itself should always be at
the front of $vdep.
Are you dealing with a broken package Makefile that defines an explicit
PROVIDES for itself? PATCH 1/1 also seems to deal with a case that should
not exist (and IMO we should rather filter such things out with a warning
in metadata generation, not in metadata parsing).
Can you give me a pointer to the two Makefiles that cause such an issue
(where does kmod-openvswitch-intree come from)?
Regards,
Matthias
> ---
> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20180905/82173f3d/attachment.sig>
-------------- next part --------------
_______________________________________________
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