Browse Source

main: Ensure log messages are printed when no UI starts

If the UI hasn't started, no messages are printed to the console
until the server starts. This is confusing, particularly if the server
never starts. Flush the UI queue through the simply handler upon connection
retry so the user sees the messages they're supposed to be seeing.

Also point the user at the logfile for hints about why this may be.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie 5 years ago
parent
commit
4b9ab675ce
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/bb/main.py

+ 2 - 1
lib/bb/main.py

@@ -468,7 +468,8 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
                 else:
                     logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc()))
             if not retries:
-                bb.fatal("Unable to connect to bitbake server, or start one")
+                bb.fatal("Unable to connect to bitbake server, or start one (server startup failures would be in bitbake-cookerdaemon.log).")
+            bb.event.print_ui_queue()
             if retries < 5:
                 time.sleep(5)