summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2018-10-01 00:45:55 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-04 23:00:24 +0100
commit50432746fe92087e3d0ac66c1a883e99ad679f76 (patch)
tree172589dde353fc58e3ae352271e0901acdc034ca /bitbake
parentccfb160ed6ce64148cdc7b2f95d7a65cdd1a2f16 (diff)
downloadpoky-50432746fe92087e3d0ac66c1a883e99ad679f76.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 524a5b0942..31323d281f 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1603,14 +1603,14 @@ class BuildInfoHelper(object):
1603 mockevent.lineno = -1 1603 mockevent.lineno = -1
1604 self.store_log_event(mockevent) 1604 self.store_log_event(mockevent)
1605 1605
1606 def store_log_event(self, event): 1606 def store_log_event(self, event,cli_backlog=True):
1607 self._ensure_build() 1607 self._ensure_build()
1608 1608
1609 if event.levelno < formatter.WARNING: 1609 if event.levelno < formatter.WARNING:
1610 return 1610 return
1611 1611
1612 # early return for CLI builds 1612 # early return for CLI builds
1613 if self.brbe is None: 1613 if cli_backlog and self.brbe is None:
1614 if not 'backlog' in self.internal_state: 1614 if not 'backlog' in self.internal_state:
1615 self.internal_state['backlog'] = [] 1615 self.internal_state['backlog'] = []
1616 self.internal_state['backlog'].append(event) 1616 self.internal_state['backlog'].append(event)
@@ -1622,7 +1622,7 @@ class BuildInfoHelper(object):
1622 tempevent = self.internal_state['backlog'].pop() 1622 tempevent = self.internal_state['backlog'].pop()
1623 logger.debug(1, "buildinfohelper: Saving stored event %s " 1623 logger.debug(1, "buildinfohelper: Saving stored event %s "
1624 % tempevent) 1624 % tempevent)
1625 self.store_log_event(tempevent) 1625 self.store_log_event(tempevent,cli_backlog)
1626 else: 1626 else:
1627 logger.info("buildinfohelper: All events saved") 1627 logger.info("buildinfohelper: All events saved")
1628 del self.internal_state['backlog'] 1628 del self.internal_state['backlog']
@@ -1987,7 +1987,8 @@ class BuildInfoHelper(object):
1987 if 'backlog' in self.internal_state: 1987 if 'backlog' in self.internal_state:
1988 # we save missed events in the database for the current build 1988 # we save missed events in the database for the current build
1989 tempevent = self.internal_state['backlog'].pop() 1989 tempevent = self.internal_state['backlog'].pop()
1990 self.store_log_event(tempevent) 1990 # Do not skip command line build events
1991 self.store_log_event(tempevent,False)
1991 1992
1992 if not connection.features.autocommits_when_autocommit_is_off: 1993 if not connection.features.autocommits_when_autocommit_is_off:
1993 transaction.set_autocommit(True) 1994 transaction.set_autocommit(True)