sanity.bbclass: re-enable DISTRO check

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.)

(From OE-Core rev: 895aa6b8ee9636a9f9d716c62c0adf951e1ff138)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton
2011-09-07 17:05:40 +01:00
committed by Richard Purdie
parent 0342cf81d5
commit ac0b2cbe45

View 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 = ""