From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] infra/pkg-virtual: validate only one provider provides an implementation
Date: Wed, 14 May 2014 00:05:36 +0200 [thread overview]
Message-ID: <20140514000536.10ad4931@free-electrons.com> (raw)
In-Reply-To: <1400017670-2708-1-git-send-email-yann.morin.1998@free.fr>
Dear Yann E. MORIN,
On Tue, 13 May 2014 23:47:50 +0200, Yann E. MORIN wrote:
> +# Providers shall call this function with all the FEATURES they provide
> +# $(eval $(call virt-provides,FEATURE[ FEATURE ...]))
> +# where FEATURE has a corresponding BR2_PACKAGE_HAS_FEATURE
> +define virt-provides
> +$(foreach p,$(1),\
> +ifneq ($$(BR2_PACKAGE_PROVIDES_$(p)),$(pkgname))$(sep)\
> +$$(error $(pkgname is trying to override $$(BR2_PACKAGE_PROVIDES_$(p)) to provide $(p)))$(sep)\
> +endif$(sep))
> +endef
>
> ################################################################################
> # inner-virtual-package -- defines the dependency rules of the virtual
> diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk
> index f6e4443..86125f2 100644
> --- a/package/rpi-userland/rpi-userland.mk
> +++ b/package/rpi-userland/rpi-userland.mk
> @@ -16,4 +16,7 @@ define RPI_USERLAND_POST_TARGET_CLEANUP
> endef
> RPI_USERLAND_POST_INSTALL_TARGET_HOOKS += RPI_USERLAND_POST_TARGET_CLEANUP
>
> +# rpi-userland is a provider for those features:
> +$(eval $(call virt-provides,LIBEGL LIBGLES OPENVG OPENMAX))
> +
> $(eval $(cmake-package))
Just thinking out loud: isn't it possible to instead check if
<pkg>_DEPENDENCIES for each virtual package contains only one word?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-05-13 22:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 18:09 [Buildroot] virtual-packages: the case for multiple providers selected Yann E. MORIN
2014-05-13 20:05 ` Thomas Petazzoni
2014-05-13 20:12 ` Thomas De Schampheleire
2014-05-13 20:18 ` Thomas Petazzoni
2014-05-14 7:21 ` Thomas De Schampheleire
2014-05-14 7:30 ` Thomas Petazzoni
2014-05-14 7:34 ` Thomas De Schampheleire
2014-05-14 7:36 ` Thomas Petazzoni
2014-05-13 21:47 ` [Buildroot] [PATCH] infra/pkg-virtual: validate only one provider provides an implementation Yann E. MORIN
2014-05-13 22:05 ` Thomas Petazzoni [this message]
2014-05-13 22:14 ` Yann E. MORIN
2014-05-14 8:10 ` Arnout Vandecappelle
2014-05-14 17:35 ` Yann E. MORIN
2014-05-14 8:11 ` [Buildroot] virtual-packages: the case for multiple providers selected Arnout Vandecappelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140514000536.10ad4931@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox