]> code.ossystems Code Review - openembedded-core.git/commitdiff
sanity.bbclass: Add sanity check that TUNE_PKGARCH appears in PACKAGE_ARCHS
authorKumar Gala <galak@kernel.crashing.org>
Fri, 29 Jul 2011 00:07:57 +0000 (19:07 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 1 Aug 2011 12:58:15 +0000 (13:58 +0100)
Its possible we get duplications if we explicity add TUNE_PKGARCH to
PACKAGE_ARCHS so instead just add a sanity check to verify it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
meta/classes/sanity.bbclass

index b054146bd11bb21454bedf0c63c6c8af520eb5bd..999e15dafdc59099b5f79336ef43353e5da0127b 100644 (file)
@@ -375,8 +375,10 @@ def check_sanity(e):
     elif oeroot.find (' ') != -1:
         messages = messages + "Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space."
 
-    # Check that we don't have duplicate entries in PACKAGE_ARCHS
+    # Check that we don't have duplicate entries in PACKAGE_ARCHS & that TUNE_PKGARCH is in PACKAGE_ARCHS
     pkgarchs = data.getVar('PACKAGE_ARCHS', e.data, True)
+    tunepkg = data.getVar('TUNE_PKGARCH', e.data, True)
+    tunefound = False
     seen = {}
     dups = []
 
@@ -385,9 +387,15 @@ def check_sanity(e):
            dups.append(pa)
        else:
            seen[pa] = 1
+       if pa == tunepkg:
+           tunefound = True
+
     if len(dups):
        messages = messages + "Error, the PACKAGE_ARCHS variable contains duplicates. The following archs are listed more than once: %s" % " ".join(dups)
 
+    if tunefound == False:
+       messages = messages + "Error, the PACKAGE_ARCHS variable does not contain TUNE_PKGARCH (%s)." % tunepkg
+
     if messages != "":
         raise_sanity_error(messages)