From: Nitin A Kamble <[email protected]>

Some BSPs need to have some specific distro_features enabled. These
BSPs fail to build when these required DISTRO features are not
enabled. And the issue is, there is no clue in the build error, about
why the build is failing.

  This commit addresses the issue by adding a generic mechanism to
check for enablement of the required distro features.

Now these BSPs can specify in their BSP config, what distro features
are required, and if these are not enabled then appropriate build
error is thrown to help fix the issue.

Signed-off-by: Nitin A Kamble <[email protected]>
---
 meta/classes/sanity.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 4df3ca8..6f9ad5f 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -603,6 +603,13 @@ def check_sanity_everybuild(status, d):
         if not ( check_conf_exists("conf/distro/${DISTRO}.conf", d) or 
check_conf_exists("conf/distro/include/${DISTRO}.inc", d) ):
             status.addresult("DISTRO '%s' not found. Please set a valid DISTRO 
in your local.conf\n" % d.getVar("DISTRO", True))
 
+    # check all the required DISTRO_FEATURES are enabled
+    distro_features_split = (d.getVar('DISTRO_FEATURES', True) or "").split()
+    required_distro_features_split = (d.getVar('REQUIRED_DISTRO_FEATURES', 
True) or "").split()
+    for rdf in required_distro_features_split:
+        if rdf not in distro_features_split:
+            status.addresult("%s is required in DISTRO_FEATURES" % rdf)
+
     # Check that DL_DIR is set, exists and is writable. In theory, we should 
never even hit the check if DL_DIR isn't 
     # set, since so much relies on it being set.
     dldir = d.getVar('DL_DIR', True)
-- 
1.8.1.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to