]> code.ossystems Code Review - openembedded-core.git/commitdiff
sanity.bbclass: Factor ASSUME_PROVIDED into qemu checks
authorRichard Purdie <richard@openedhand.com>
Thu, 9 Aug 2007 10:57:33 +0000 (10:57 +0000)
committerRichard Purdie <richard@openedhand.com>
Thu, 9 Aug 2007 10:57:33 +0000 (10:57 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2425 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/classes/sanity.bbclass

index 2742dada7de1666d751e6168989b58f15318cfc4..a5f935c8930b001de5d7eb2d5bdf4e51fbe7dcaa 100644 (file)
@@ -65,8 +65,9 @@ def check_sanity(e):
        if data.getVar('TARGET_OS', e.data, True) == 'INVALID':
                messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n'
 
+       assume_provided = data.getVar('ASSUME_PROVIDED', e.data , True).split()
        # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
-       if "diffstat-native" not in data.getVar('ASSUME_PROVIDED', e.data, True).split():
+       if "diffstat-native" not in assume_provided:
                messages = messages + 'Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n'
        
        # Check that the MACHINE is valid
@@ -96,10 +97,11 @@ def check_sanity(e):
                        missing = missing + "%s," % util
 
        # qemu-native needs gcc 3.x
-       gcc_version = commands.getoutput("${BUILD_PREFIX}gcc --version | head -n 1 | cut -f 3 -d ' '")
+       if "qemu-native" not in assume_provided:
+               gcc_version = commands.getoutput("${BUILD_PREFIX}gcc --version | head -n 1 | cut -f 3 -d ' '")
 
-       if not check_app_exists('gcc-3.4', e.data) and not check_app_exists('gcc-3.3', e.data) and gcc_version[0] != '3':
-               missing = missing + "gcc-3.x (needed for qemu-native),"
+               if not check_app_exists('gcc-3.4', e.data) and not check_app_exists('gcc-3.3', e.data) and gcc_version[0] != '3':
+                       missing = missing + "gcc-3.x (needed for qemu-native),"
 
        if missing != "":
                missing = missing.rstrip(',')