sanity.bbclass: Requiring MACHINE to be set is too paranoid.
authorPaul Sokolovsky <pmiscml@gmail.com>
Sat, 15 Dec 2007 05:25:44 +0000 (05:25 +0000)
committerPaul Sokolovsky <pmiscml@gmail.com>
Sat, 15 Dec 2007 05:25:44 +0000 (05:25 +0000)
* It's pretty legal to have only TARGET_ARCH set, for example to build
non-machine-specific packages (for example, using external SDK).

classes/sanity.bbclass

index 479abce..cc413b7 100644 (file)
@@ -70,8 +70,9 @@ def check_sanity(e):
        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
-       if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data):
+       # Check that the MACHINE is valid, if it is set
+       if data.getVar('MACHINE', e.data, True):
+           if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data):
                messages = messages + 'Please set a valid MACHINE in your local.conf\n'
        
        # Check that the DISTRO is valid