aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-01-19 16:28:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-23 11:33:52 +0000
commitc7af070b66aa5d4804def32ed0a7966f22b331dc (patch)
tree9769682c96ae007a27d2b04c6273319e4c0e62fe /bitbake/lib/bb/ui/buildinfohelper.py
parent4dc8edb610f1a01c5f40fd54cc5198a1e2b0dd25 (diff)
downloadopenembedded-core-contrib-c7af070b66aa5d4804def32ed0a7966f22b331dc.tar.gz
bitbake: toasterui: save event backlog to build
We add a call that saves any queued events to the build [YOCTO #7021] (Bitbake rev: 4f5b19d453da64749affc1c27ec51b013bedc71a) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/buildinfohelper.py')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 9e801acc78..be0de6b17c 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1135,6 +1135,7 @@ class BuildInfoHelper(object):
return
if 'build' in self.internal_state and 'backlog' in self.internal_state:
+ # if we have a backlog of events, do our best to save them here
if len(self.internal_state['backlog']):
tempevent = self.internal_state['backlog'].pop()
logger.debug(1, "buildinfohelper: Saving stored event %s " % tempevent)
@@ -1164,5 +1165,11 @@ class BuildInfoHelper(object):
self._store_build_done(errorcode)
if 'backlog' in self.internal_state:
- for event in self.internal_state['backlog']:
- logger.error("Unsaved log: %s", event.msg)
+ if 'build' in self.internal_state:
+ # we save missed events in the database for the current build
+ tempevent = self.internal_state['backlog'].pop()
+ self.store_log_event(tempevent)
+ else:
+ # we have no build, and we still have events; something amazingly wrong happend
+ for event in self.internal_state['backlog']:
+ logger.error("UNSAVED log: %s", event.msg)