All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] base.bbclass: Add COMPATIBLE_DISTRO_FEATURES support
@ 2013-05-28 15:04 Otavio Salvador
  2013-05-28 15:12 ` Phil Blundell
  0 siblings, 1 reply; 11+ messages in thread
From: Otavio Salvador @ 2013-05-28 15:04 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador

This add support to list compatible distro feature for a recipe; this
is important for example when you have two different recipes which
should be choosen depending on the distro features set.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/base.bbclass | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index b1642a2..1c0b0d9 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -522,6 +522,16 @@ python () {
             else:
                 raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE', True))
 
+        need_distro_features = d.getVar('COMPATIBLE_DISTRO_FEATURES', True)
+        if need_distro_features:
+            need_distro_features = need_distro_features.split()
+            distro_features = (d.getVar('DISTRO_FEATURES', True) or "").split()
+            for f in need_distro_features:
+                if f in distro_features:
+                    bb.note("here")
+                    break
+            else:
+                raise bb.parse.SkipPackage("incompatible with distro features %s (not in DISTRO_FEATURES)" % need_distro_features)
 
         bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE', True) or "").split()
 
-- 
1.8.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-05-28 16:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-28 15:04 [PATCH] base.bbclass: Add COMPATIBLE_DISTRO_FEATURES support Otavio Salvador
2013-05-28 15:12 ` Phil Blundell
2013-05-28 15:18   ` Otavio Salvador
2013-05-28 15:21     ` Eric Bénard
2013-05-28 15:26       ` Otavio Salvador
2013-05-28 15:31     ` Phil Blundell
2013-05-28 16:08       ` Otavio Salvador
2013-05-28 16:28         ` Phil Blundell
2013-05-28 16:33           ` Otavio Salvador
2013-05-28 16:36             ` Phil Blundell
2013-05-28 16:39               ` Otavio Salvador

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.