summaryrefslogtreecommitdiff
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass32
1 files changed, 20 insertions, 12 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 9d183e352f..13940f81db 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -124,6 +124,14 @@ def check_sanity(e):
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 DL_DIR is set, exists and is writable. In theory, we should never even hit the check if DL_DIR isn't
+ # set, since so much relies on it being set.
+ dldir = data.getVar('DL_DIR', e.data, True)
+ if not dldir:
+ messages = messages + "DL_DIR is not set. Your environment is misconfigured, check that DL_DIR is set, and if the directory exists, that it is writable. \n"
+ 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
# need to take into account DISTRO renaming DISTRO
@@ -155,6 +163,9 @@ def check_sanity(e):
if not check_app_exists("qemu-arm", e.data):
messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
+ if "." in data.getVar('PATH', e.data, True).split(":"):
+ messages = messages + "PATH contains '.' which will break the build, please remove this"
+
if data.getVar('TARGET_ARCH', e.data, True) == "arm":
# This path is no longer user-readable in modern (very recent) Linux
try:
@@ -178,11 +189,12 @@ def check_sanity(e):
if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu':
messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
- # Ensure we have the binary for TERMCMD, as when patch application fails the error is fairly intimidating
- termcmd = data.getVar("TERMCMD", e.data, True)
- term = termcmd.split()[0]
- if not check_app_exists(term, e.data):
- messages = messages + "The console for use in patch error resolution is not available, please install %s or set TERMCMD and TERMCMDRUN (as documented in local.conf).\n" % term
+ if data.getVar('PATCHRESOLVE', e.data, True) != 'noop':
+ # Ensure we have the binary for TERMCMD, as when patch application fails the error is fairly intimidating
+ termcmd = data.getVar("TERMCMD", e.data, True)
+ term = termcmd.split()[0]
+ if not check_app_exists(term, e.data):
+ messages = messages + "The console for use in patch error resolution is not available, please install %s or set TERMCMD and TERMCMDRUN (as documented in local.conf).\n" % term
if os.path.basename(os.readlink('/bin/sh')) == 'dash':
messages = messages + "Using dash as /bin/sh causes various subtle build problems, please use bash instead (e.g. 'dpkg-reconfigure dash' on an Ubuntu system.\n"
@@ -196,9 +208,6 @@ def check_sanity(e):
if not oes_bb_conf:
messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n'
- if data.getVar('SDK_ARCH', e.data, True) == 'i686':
- messages = messages + '"Please set SDKMACHINE to i586. It is currently defaulting to the build machine architecture of i686 and this is known to have issues (see local.conf).\n'
-
nolibs = data.getVar('NO32LIBS', e.data, True)
if not nolibs:
lib32path = '/lib'
@@ -292,7 +301,7 @@ def check_sanity(e):
f.write(current_abi)
elif (abi != current_abi):
# Code to convert from one ABI to another could go here if possible.
- messages = messages + "Error, TMPDIR has changed ABI (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)
+ messages = messages + "Error, TMPDIR has changed its layout version number (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)
else:
f = file(abifile, "w")
f.write(current_abi)
@@ -300,7 +309,7 @@ def check_sanity(e):
oeroot = data.getVar('POKYBASE', e.data)
if oeroot.find ('+') != -1:
- messages = messages + "Error, you have an invalid character (+) in your POKYBASE directory path. Please more Poky to a directory which doesn't include a +."
+ messages = messages + "Error, you have an invalid character (+) in your POKYBASE directory path. Please move Poky to a directory which doesn't include a +."
elif oeroot.find (' ') != -1:
messages = messages + "Error, you have a space in your POKYBASE directory path. Please move Poky to a directory which doesn't include a space."
@@ -309,9 +318,8 @@ def check_sanity(e):
addhandler check_sanity_eventhandler
python check_sanity_eventhandler() {
- from bb.event import Handled, NotHandled
if bb.event.getName(e) == "ConfigParsed" and bb.data.getVar("BB_WORKERCONTEXT", e.data, True) != "1":
check_sanity(e)
- return NotHandled
+ return
}