aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/build.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-07-13 16:05:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-16 15:05:08 +0100
commite561b997c55e8537d82aa1339adfff4505cc38b7 (patch)
tree3abf0f797408d0489840cfde7e040fb93a5a106b /lib/bb/build.py
parent3e2db8d7eaa0f14813213d1c95d3ee9efd97dc9d (diff)
downloadbitbake-e561b997c55e8537d82aa1339adfff4505cc38b7.tar.gz
lib/bb: provide mechanism to bypass UI log suppression
The recent change to connect through the shell logging functions had an unexpected side-effect - bb.error() and bb.fatal() cause a flag to be set internally such that BitBake's UI will not print the full task log on failure; unfortunately we have in places within the OpenEmbedded metadata called these shell logging functions under error situations where we still want to see the full log (i.e., the message we're sending doesn't include the full error). Thus, provide a mechanism to fatally exit with an error but unset the flag, utilising the built-in python logging functionality that allows extra values to be passed in the log record. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/build.py')
-rw-r--r--lib/bb/build.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index cce01feba..34399640c 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -350,6 +350,8 @@ exit $?
# The caller will call exit themselves, so bb.error() is
# what we want here rather than bb.fatal()
bb.error(value)
+ elif cmd == 'bbfatal_log':
+ bb.error(value, forcelog=True)
elif cmd == 'bbdebug':
splitval = value.split(' ', 1)
level = int(splitval[0])
@@ -446,7 +448,10 @@ def _exec_task(fn, task, d, quieterr):
self.triggered = False
logging.Handler.__init__(self, logging.ERROR)
def emit(self, record):
- self.triggered = True
+ if getattr(record, 'forcelog', False):
+ self.triggered = False
+ else:
+ self.triggered = True
# Handle logfiles
si = open('/dev/null', 'r')