summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
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
parent4dc8edb610f1a01c5f40fd54cc5198a1e2b0dd25 (diff)
downloadpoky-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')
-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):
1135 return 1135 return
1136 1136
1137 if 'build' in self.internal_state and 'backlog' in self.internal_state: 1137 if 'build' in self.internal_state and 'backlog' in self.internal_state:
1138 # if we have a backlog of events, do our best to save them here
1138 if len(self.internal_state['backlog']): 1139 if len(self.internal_state['backlog']):
1139 tempevent = self.internal_state['backlog'].pop() 1140 tempevent = self.internal_state['backlog'].pop()
1140 logger.debug(1, "buildinfohelper: Saving stored event %s " % tempevent) 1141 logger.debug(1, "buildinfohelper: Saving stored event %s " % tempevent)
@@ -1164,5 +1165,11 @@ class BuildInfoHelper(object):
1164 self._store_build_done(errorcode) 1165 self._store_build_done(errorcode)
1165 1166
1166 if 'backlog' in self.internal_state: 1167 if 'backlog' in self.internal_state:
1167 for event in self.internal_state['backlog']: 1168 if 'build' in self.internal_state:
1168 logger.error("Unsaved log: %s", event.msg) 1169 # we save missed events in the database for the current build
1170 tempevent = self.internal_state['backlog'].pop()
1171 self.store_log_event(tempevent)
1172 else:
1173 # we have no build, and we still have events; something amazingly wrong happend
1174 for event in self.internal_state['backlog']:
1175 logger.error("UNSAVED log: %s", event.msg)