mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
bitbake: 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] (Bitbake rev: 6458cc4234337f551dfe189b6f8800d8da886c24) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ccfb160ed6
commit
50432746fe
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user