sanity.bbclass: relax the DISTRO check a bit, taking into account that some DISTRO...
authorMichael Lauer <mickey@vanille-media.de>
Sat, 15 Jul 2006 09:54:08 +0000 (09:54 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sat, 15 Jul 2006 09:54:08 +0000 (09:54 +0000)
override DISTRO before sanity.bbclass gets a chance to see it. By definition, in this case $RENAMED_DISTRO
needs to be present in distro/include/ though, so we have a second chance for the test to succeed.

classes/sanity.bbclass

index a626162..91ca986 100644 (file)
@@ -64,13 +64,14 @@ def check_sanity(e):
        if "diffstat-native" not in data.getVar('ASSUME_PROVIDED', e.data, True).split():
                raise_sanity_error('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf')
        
-       # Check the MACHINE is valid
+       # Check that the MACHINE is valid
        if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data):
                raise_sanity_error('Please set a valid MACHINE in your local.conf')
        
-       # Check the distro is valid
-       if not check_conf_exists("conf/distro/${DISTRO}.conf", e.data):
-               raise_sanity_error('Please set a valid DISTRO in your local.conf')
+       # Check that the DISTRO is valid
+       # need to take into account DISTRO renaming DISTRO
+       if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ):
+               raise_sanity_error("DISTRO '%s' not found. Please set a valid DISTRO in your local.conf" % data.getVar("DISTRO", e.data, True ))
 
        if not check_app_exists("${MAKE}", e.data):
                raise_sanity_error('GNU make missing. Please install GNU make')