summaryrefslogtreecommitdiffstats
path: root/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-04-02 11:56:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-05 14:55:18 +0100
commitfc7a74e7961775b5d7ff25298abed10138d24dc9 (patch)
tree3334d2c520e3627ecdd000b9ec9c8e8bf5c1e168 /lib/bb/ui/buildinfohelper.py
parentf4e57f794651c4894600445e843ca9d5e104cd84 (diff)
downloadbitbake-fc7a74e7961775b5d7ff25298abed10138d24dc9.tar.gz
toasterui: save warnings from non-build context
Some warnings and errors may come from a non-build context, and they were not saved, even if they were counted for the current build. This patch saves these messages in memory until we have the entire build context available. [YOCTO #5642] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Diffstat (limited to 'lib/bb/ui/buildinfohelper.py')
-rw-r--r--lib/bb/ui/buildinfohelper.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index dd93d0b6c..69655709d 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -933,15 +933,23 @@ class BuildInfoHelper(object):
self._store_log_information(LogMessage.ERROR, text)
def store_log_event(self, event):
- # look up license files info from insane.bbclass
- m = re.match("([^:]*): md5 checksum matched for ([^;]*)", event.msg)
- if m:
- (pn, fn) = m.groups()
- self.internal_state['recipes'][pn].save()
+ if 'build' in self.internal_state and 'backlog' in self.internal_state:
+ if len(self.internal_state['backlog']):
+ tempevent = self.internal_state['backlog'].pop()
+ print "Saving stored event ", tempevent
+ self.store_log_event(tempevent)
+ else:
+ del self.internal_state['backlog']
if event.levelno < format.WARNING:
return
+
if not 'build' in self.internal_state:
+ print "Save event for later"
+ if not 'backlog' in self.internal_state:
+ self.internal_state['backlog'] = []
+ self.internal_state['backlog'].append(event)
+
return
log_information = {}
log_information['build'] = self.internal_state['build']