Patchwork [bitbake-devel,4/9] toasterui: Show in the log that ToasterUi is ready to receive events.

login
register
mail settings
Submitter Alexandru DAMIAN
Date July 9, 2014, 4:55 p.m.
Message ID <9949948f92bbe2717a05a380d3df63a332d39c9a.1404924714.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/75273/
State New
Headers show

Comments

Alexandru DAMIAN - July 9, 2014, 4:55 p.m.
From: Dave Lerner <dave.lerner@windriver.com>

Issue: TA53702

It was observed that a sequence in a script such as
   bitbake --server-only ..
   bitbake --observe-only ..
   bitbake <some target>
could generate events from the server to the observer before
the observer was ready to read the events, and the early events
of builds were consistently dropped.  Adding a "ready" note in the
log allows the script to scan for that message before proceeding
to building a target.

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 lib/bb/ui/toasterui.py | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/lib/bb/ui/toasterui.py b/lib/bb/ui/toasterui.py
index b1c80cc..5f87a9d 100644
--- a/lib/bb/ui/toasterui.py
+++ b/lib/bb/ui/toasterui.py
@@ -91,6 +91,7 @@  def main(server, eventHandler, params ):
     errors = 0
     warnings = 0
     taskfailures = []
+    first = True
 
     buildinfohelper = BuildInfoHelper(server, build_history_enabled)
 
@@ -98,6 +99,9 @@  def main(server, eventHandler, params ):
     while True:
         try:
             event = eventHandler.waitEvent(0.25)
+            if first:
+                first = False
+                logger.info("ToasterUI waiting for events")
 
             if event is None:
                 if main.shutdown > 0: