]> code.ossystems Code Review - openembedded-core.git/commitdiff
sanity.bbclass: re-enable DISTRO check
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 7 Sep 2011 16:05:40 +0000 (17:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 7 Sep 2011 21:30:13 +0000 (22:30 +0100)
If DISTRO has been specified, ensure it is valid. (Unset or empty string
is valid for DISTRO in OE-core by the use of defaultsetup.conf.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sanity.bbclass

index 44b06880ad59a8800aba697f2e3f85b939e18118..93008cc6855ce67ea9e53cd8493f9670b649acb2 100644 (file)
@@ -269,10 +269,12 @@ def check_sanity(e):
     if os.path.exists(dldir) and not os.access(dldir, os.W_OK):
         messages = messages + "DL_DIR: %s exists but you do not appear to have write access to it. \n" % dldir
     
-    # Check that the DISTRO is valid
+    # Check that the DISTRO is valid, if set
     # 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) ):
-    #    messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True )
+    distro = data.getVar('DISTRO', e.data, True)
+    if distro:
+        if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ):
+            messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True )
 
     missing = ""