summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/toasterui.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-07-24 18:20:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-29 13:56:48 +0100
commit7eb3e45a33e6fdd310ba47375f6a4577614cc9c4 (patch)
tree834060e5554d68c24fda9a63a429cb0a72bb06a7 /bitbake/lib/bb/ui/toasterui.py
parent669c07d6022174d01fe5a95b7b0faa9ef86da1e2 (diff)
downloadpoky-7eb3e45a33e6fdd310ba47375f6a4577614cc9c4.tar.gz
poky-7eb3e45a33e6fdd310ba47375f6a4577614cc9c4.tar.bz2
poky-7eb3e45a33e6fdd310ba47375f6a4577614cc9c4.zip
bitbake: toasterui: refactor log saving and save out-of-build errors
We refactor log saving to go through only one code path. All logs that happened outside the build (i.e. before build starting) now will be logged to either toaster_ui.log if the build command ran in interactive mode, or to the build request errors if the command ran in managed mode. This enables proper display of error logs in project page. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/toasterui.py')
-rw-r--r--bitbake/lib/bb/ui/toasterui.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index 2f628e9a72..d81b8a989c 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -94,7 +94,6 @@ def main(server, eventHandler, params ):
first = True
buildinfohelper = BuildInfoHelper(server, build_history_enabled)
- brbe = None
while True:
try:
@@ -111,7 +110,7 @@ def main(server, eventHandler, params ):
helper.eventHandler(event)
if isinstance(event, bb.event.BuildStarted):
- brbe = buildinfohelper.store_started_build(event)
+ buildinfohelper.store_started_build(event)
if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)):
buildinfohelper.update_and_store_task(event)
@@ -222,19 +221,18 @@ def main(server, eventHandler, params ):
bb.command.CommandExit)):
if (isinstance(event, bb.command.CommandFailed)):
event.levelno = format.ERROR
- event.msg = event.error
+ event.msg = "Command Failed " + event.error
event.pathname = ""
event.lineno = 0
buildinfohelper.store_log_event(event)
errors += 1
buildinfohelper.update_build_information(event, errors, warnings, taskfailures)
+ buildinfohelper.close()
# we start a new build info
- if brbe is not None:
- br_id, be_id = brbe.split(":")
- buildinfohelper.store_build_done(br_id, be_id)
+ if buildinfohelper.brbe is not None:
print "we are under BuildEnvironment management - after the build, we exit"
server.terminateServer()