diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-04-06 17:46:28 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-06 23:10:28 +0100 |
commit | d6992a8d69cc896b4e6713fef464b946a40c4f15 (patch) | |
tree | 1789c36bb0579c2929eb8a63ce620882aca5975b /bitbake/lib/bb/ui/toasterui.py | |
parent | c4ae028209c17dae523c1b582276050959ef74de (diff) | |
download | poky-d6992a8d69cc896b4e6713fef464b946a40c4f15.tar.gz |
bitbake: toasterui: shutdown on BuildCompleted event
toasterui exits event loop on one of the following events:
CommandCompleted, CommandFailed or CommandExit.
Unfortunately none of them come from bitbake when build fails.
This is normai if toasterui runs in observer mode. However, if it's
in build mode this causes toasterui to stuck in the infinite loop
waiting for new events.
The only event we can rely on is BuildCompleted as it always
comes from bitbake unlike 3 above mentioned events.
Modified the code to always shutdown toasterui in build mode
on BuildCompleted event.
(Bitbake rev: 9cd60f98b13cf7b1c518851a51e1cbaa596d8f81)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/toasterui.py')
-rw-r--r-- | bitbake/lib/bb/ui/toasterui.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py index 39a4fe5005..6bf4c1f030 100644 --- a/bitbake/lib/bb/ui/toasterui.py +++ b/bitbake/lib/bb/ui/toasterui.py | |||
@@ -377,11 +377,14 @@ def main(server, eventHandler, params): | |||
377 | buildinfohelper.close(errorcode) | 377 | buildinfohelper.close(errorcode) |
378 | 378 | ||
379 | # we start a new build info | 379 | # we start a new build info |
380 | logger.debug("ToasterUI prepared for new build") | 380 | if params.observe_only: |
381 | errors = 0 | 381 | logger.debug("ToasterUI prepared for new build") |
382 | warnings = 0 | 382 | errors = 0 |
383 | taskfailures = [] | 383 | warnings = 0 |
384 | buildinfohelper = BuildInfoHelper(server, build_history_enabled) | 384 | taskfailures = [] |
385 | buildinfohelper = BuildInfoHelper(server, build_history_enabled) | ||
386 | else: | ||
387 | main.shutdown = 1 | ||
385 | 388 | ||
386 | logger.info("ToasterUI build done, brbe: %s", brbe) | 389 | logger.info("ToasterUI build done, brbe: %s", brbe) |
387 | continue | 390 | continue |