Patchwork [1/1] classes/sanity: check if SDKMACHINE setting has taken effect

login
register
mail settings
Submitter Paul Eggleton
Date March 31, 2014, 10:29 a.m.
Message ID <c43e9e4067c3dfcf8c25d8783f4e26e580dc3e13.1396261733.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/69681/
State Accepted
Commit 49f2bc450c1dd969eba30287050e25030116b714
Headers show

Comments

Paul Eggleton - March 31, 2014, 10:29 a.m.
If you try to set SDKMACHINE in a distro configuration file, it won't
take effect because by the time that is parsed the line in bitbake.conf
which includes the appropriate conf file for SDKMACHINE has already been
parsed. Check that SDK_ARCH has changed from its default value and show
an error if it hasn't in order to catch this misconfiguration.

Fixes [YOCTO #5861].

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

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index cf514d0..69d6a24 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -667,6 +667,8 @@  def check_sanity_everybuild(status, d):
     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')
+        elif d.getVar('SDK_ARCH', False) == "${BUILD_ARCH}":
+            status.addresult('SDKMACHINE is set, but SDK_ARCH has not been changed as a result - SDKMACHINE may have been set too late (e.g. in the distro configuration)\n')
 
     check_supported_distro(d)