[oe-commits] [bitbake] 18/45: toasterui: shutdown on BuildCompleted event

git at git.openembedded.org git at git.openembedded.org
Wed Apr 6 22:11:36 UTC 2016


rpurdie pushed a commit to branch master
in repository bitbake.

commit 9cd60f98b13cf7b1c518851a51e1cbaa596d8f81
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Wed Apr 6 17:46:28 2016 +0100

    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.
    
    Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
    Signed-off-by: Michael Wood <michael.g.wood at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/ui/toasterui.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lib/bb/ui/toasterui.py b/lib/bb/ui/toasterui.py
index 39a4fe5..6bf4c1f 100644
--- a/lib/bb/ui/toasterui.py
+++ b/lib/bb/ui/toasterui.py
@@ -377,11 +377,14 @@ def main(server, eventHandler, params):
                 buildinfohelper.close(errorcode)
 
                 # we start a new build info
-                logger.debug("ToasterUI prepared for new build")
-                errors = 0
-                warnings = 0
-                taskfailures = []
-                buildinfohelper = BuildInfoHelper(server, build_history_enabled)
+                if params.observe_only:
+                    logger.debug("ToasterUI prepared for new build")
+                    errors = 0
+                    warnings = 0
+                    taskfailures = []
+                    buildinfohelper = BuildInfoHelper(server, build_history_enabled)
+                else:
+                    main.shutdown = 1
 
                 logger.info("ToasterUI build done, brbe: %s", brbe)
                 continue

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list