[OE-core] [PATCH] base.bbclass: Add COMPATIBLE_DISTRO_FEATURES support
Otavio Salvador
otavio at ossystems.com.br
Tue May 28 15:04:35 UTC 2013
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 at 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
More information about the Openembedded-core
mailing list