aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-16 13:24:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-16 17:54:39 +0100
commita8efff5c83cd5a25f4b6720e6414a7aa35d04bc7 (patch)
tree63bdafd16bbcd00114da5ac1237723b818ceab5a
parentde578cd8f8b582c7bea83c75d06b7f667c07578a (diff)
downloadbitbake-a8efff5c83cd5a25f4b6720e6414a7aa35d04bc7.tar.gz
ui/toasterui: Fix startup faults from incorrect event sequencing
Toaster has been failing to start correctly when in interactive mode. The issue is due to setEventMask being called (which triggers parsing) before the environment has been sent from the UI over to the server. This means PATH isn't setup, which causes the sanity checks on HOSTTOOLS to fail in base.bbclass. The fix is to ensure the environment is sent to the server before other commands are run. The pain in debugging this highlights other improvements to the logging are needed. [YOCTO #14079] Reviewed-by: Tim Orling <timothy.t.orling@linux.intel.com> Tested-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/ui/toasterui.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/ui/toasterui.py b/lib/bb/ui/toasterui.py
index 9260f5d9d..ec5bd4f10 100644
--- a/lib/bb/ui/toasterui.py
+++ b/lib/bb/ui/toasterui.py
@@ -131,6 +131,10 @@ def main(server, eventHandler, params):
helper = uihelper.BBUIHelper()
+ if not params.observe_only:
+ params.updateToServer(server, os.environ.copy())
+ params.updateFromServer(server)
+
# TODO don't use log output to determine when bitbake has started
#
# WARNING: this log handler cannot be removed, as localhostbecontroller
@@ -162,8 +166,6 @@ def main(server, eventHandler, params):
logger.warning("buildstats is not enabled. Please enable INHERIT += \"buildstats\" to generate build statistics.")
if not params.observe_only:
- params.updateFromServer(server)
- params.updateToServer(server, os.environ.copy())
cmdline = params.parseActions()
if not cmdline:
print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")