diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-16 13:24:13 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-17 12:36:14 +0100 |
commit | 7cad26d585f67fa6bf873b8be361c6335a7db376 (patch) | |
tree | 0a4d4f3fe8a065fba9c5bb050262aae3fdbdbe1f /bitbake/lib | |
parent | 1613cd01d0909e6ddbdc0a59ad9f0d89f2f8ed76 (diff) | |
download | poky-7cad26d585f67fa6bf873b8be361c6335a7db376.tar.gz |
bitbake: 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>
(Bitbake rev: a8efff5c83cd5a25f4b6720e6414a7aa35d04bc7)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/ui/toasterui.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py index 9260f5d9d7..ec5bd4f105 100644 --- a/bitbake/lib/bb/ui/toasterui.py +++ b/bitbake/lib/bb/ui/toasterui.py | |||
@@ -131,6 +131,10 @@ def main(server, eventHandler, params): | |||
131 | 131 | ||
132 | helper = uihelper.BBUIHelper() | 132 | helper = uihelper.BBUIHelper() |
133 | 133 | ||
134 | if not params.observe_only: | ||
135 | params.updateToServer(server, os.environ.copy()) | ||
136 | params.updateFromServer(server) | ||
137 | |||
134 | # TODO don't use log output to determine when bitbake has started | 138 | # TODO don't use log output to determine when bitbake has started |
135 | # | 139 | # |
136 | # WARNING: this log handler cannot be removed, as localhostbecontroller | 140 | # WARNING: this log handler cannot be removed, as localhostbecontroller |
@@ -162,8 +166,6 @@ def main(server, eventHandler, params): | |||
162 | logger.warning("buildstats is not enabled. Please enable INHERIT += \"buildstats\" to generate build statistics.") | 166 | logger.warning("buildstats is not enabled. Please enable INHERIT += \"buildstats\" to generate build statistics.") |
163 | 167 | ||
164 | if not params.observe_only: | 168 | if not params.observe_only: |
165 | params.updateFromServer(server) | ||
166 | params.updateToServer(server, os.environ.copy()) | ||
167 | cmdline = params.parseActions() | 169 | cmdline = params.parseActions() |
168 | if not cmdline: | 170 | if not cmdline: |
169 | print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.") | 171 | print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.") |