diff options
author | David Reyna <David.Reyna@windriver.com> | 2018-10-01 00:45:55 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-04 14:33:53 +0100 |
commit | 6458cc4234337f551dfe189b6f8800d8da886c24 (patch) | |
tree | 58fda44719c42f55a48c4bad3ffae0282fea82f6 | |
parent | 90a3181f1397ae05862f4e89a9bbac606e74504e (diff) | |
download | bitbake-6458cc4234337f551dfe189b6f8800d8da886c24.tar.gz |
toaster: error logs missing for cli builds
The method 'store_log_event' in 'buildinfohelper.py' always puts log
messages from CLI builds into the backlog but never takes them out.
The "close" method now forces all backlogged CLI events to be registered.
[YOCTO #12813]
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/ui/buildinfohelper.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py index 524a5b094..31323d281 100644 --- a/lib/bb/ui/buildinfohelper.py +++ b/lib/bb/ui/buildinfohelper.py @@ -1603,14 +1603,14 @@ class BuildInfoHelper(object): mockevent.lineno = -1 self.store_log_event(mockevent) - def store_log_event(self, event): + def store_log_event(self, event,cli_backlog=True): self._ensure_build() if event.levelno < formatter.WARNING: return # early return for CLI builds - if self.brbe is None: + if cli_backlog and self.brbe is None: if not 'backlog' in self.internal_state: self.internal_state['backlog'] = [] self.internal_state['backlog'].append(event) @@ -1622,7 +1622,7 @@ class BuildInfoHelper(object): tempevent = self.internal_state['backlog'].pop() logger.debug(1, "buildinfohelper: Saving stored event %s " % tempevent) - self.store_log_event(tempevent) + self.store_log_event(tempevent,cli_backlog) else: logger.info("buildinfohelper: All events saved") del self.internal_state['backlog'] @@ -1987,7 +1987,8 @@ class BuildInfoHelper(object): if 'backlog' 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) + # Do not skip command line build events + self.store_log_event(tempevent,False) if not connection.features.autocommits_when_autocommit_is_off: transaction.set_autocommit(True) |