]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/sanity: check if SDKMACHINE setting has taken effect
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 31 Mar 2014 10:29:36 +0000 (11:29 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 31 Mar 2014 16:45:33 +0000 (17:45 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sanity.bbclass

index cf514d0c23944c0d9e362f878dbdc533ec16ea82..69d6a246de5b92e4ff62615aaf115f271812d6f7 100644 (file)
@@ -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)