All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] pkg-virtual: fix host dependencies handling
@ 2017-07-02 21:42 Thomas Petazzoni
  0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni @ 2017-07-02 21:42 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=346e926c1506ec8bc99ce3dd653d01ebb605fc70
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

If $(BR2_PACKAGE_HAS_HOST_FOO) is defined, then the pkg-virtual
infrastructure will check if $(BR2_PACKAGE_PROVIDES_HOST_FOO) is not
empty.

But later, $(BR2_PACKAGE_HOST_FOO_DEPENDENCIES) will be set from
$(BR2_PACKAGE_PROVIDES_FOO), ignoring $(BR2_PACKAGE_PROVIDES_HOST_FOO).

So fix this discrepancy by setting $(BR2_PACKAGE_HOST_FOO_DEPENDENCIES)
from $(BR2_PACKAGE_PROVIDES_FOO) only if $(BR2_PACKAGE_PROVIDES_HOST_FOO)
is empty.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas: add comments suggested by Arnout.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/pkg-virtual.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/pkg-virtual.mk b/package/pkg-virtual.mk
index 2e83e07..0de79d4 100644
--- a/package/pkg-virtual.mk
+++ b/package/pkg-virtual.mk
@@ -49,7 +49,13 @@ $(2)_IS_VIRTUAL = YES
 ifeq ($(4),target)
 $(2)_DEPENDENCIES += $$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2)))
 else
+ifeq ($$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2))),)
+# Inherit from target package BR2_PACKAGE_PROVIDES_FOO
 $(2)_DEPENDENCIES += host-$$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(3)))
+else
+# BR2_PACKAGE_PROVIDES_HOST_<pkg> is explicitly defined
+$(2)_DEPENDENCIES += $$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2)))
+endif
 endif
 
 # Call the generic package infrastructure to generate the necessary

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-02 21:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-02 21:42 [Buildroot] [git commit] pkg-virtual: fix host dependencies handling Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.