Patchwork [03/11] classes/sanity: validate SDKMACHINE value

login
register
mail settings
Submitter Paul Eggleton
Date Nov. 13, 2013, 2:32 p.m.
Message ID <22a0ccd54622f1893f965c5efe7ed3d1ddb3e61a.1384353075.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/61631/
State Accepted
Commit c028dcda06733f6a6b3386279fb6089ab0d468ea
Headers show

Comments

Paul Eggleton - Nov. 13, 2013, 2:32 p.m.
If SDKMACHINE is set then check that a configuration file matching it
actually exists, otherwise the user won't know that they've set it
incorrectly.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/sanity.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 83378b0..6807a23 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -625,6 +625,11 @@  def check_sanity_everybuild(status, d):
     if machinevalid:
         status.addresult(check_toolchain(d))
 
+    # Check that the SDKMACHINE is valid, if it is set
+    if d.getVar('SDKMACHINE', True):
+        if not check_conf_exists("conf/machine-sdk/${SDKMACHINE}.conf", d):
+            status.addresult('Specified SDKMACHINE value is not valid\n')
+
     check_supported_distro(d)
 
     # Check if DISPLAY is set if TEST_IMAGE is set