[oe-commits] [bitbake] 15/17: toasterui: make toasterui to work in build mode
git at git.openembedded.org
git at git.openembedded.org
Mon Mar 7 17:24:07 UTC 2016
rpurdie pushed a commit to branch master
in repository bitbake.
commit d4b5796899c3ca5c7becd7322291afd8afb35a31
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Wed Mar 2 22:47:42 2016 -0800
toasterui: make toasterui to work in build mode
Currently toasterui works only in observer mode. This is
artificial limitation which was made to support current toaster
design. As we decided to stop using bitbake server we'll
need to run toasterui also in build mode.
[YOCTO #7880]
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: brian avery <avery.brian at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/ui/toasterui.py | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/lib/bb/ui/toasterui.py b/lib/bb/ui/toasterui.py
index fec6962..2d44377 100644
--- a/lib/bb/ui/toasterui.py
+++ b/lib/bb/ui/toasterui.py
@@ -168,8 +168,23 @@ def main(server, eventHandler, params):
build_history_enabled = False
if not params.observe_only:
- logger.error("ToasterUI can only work in observer mode")
- return 1
+ 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.")
+ return 1
+ if 'msg' in cmdline and cmdline['msg']:
+ logger.error(cmdline['msg'])
+ return 1
+
+ ret, error = server.runCommand(cmdline['action'])
+ if error:
+ logger.error("Command '%s' failed: %s" % (cmdline, error))
+ return 1
+ elif ret != True:
+ logger.error("Command '%s' failed: returned %s" % (cmdline, ret))
+ return 1
# set to 1 when toasterui needs to shut down
main.shutdown = 0
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list