summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-03-02 22:47:42 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-07 17:23:04 +0000
commit8e138b7f2a38b55a95452cf0f54bfd320e8c59af (patch)
tree31c25a286d00dee5901017df5c28417f65610eea /bitbake/lib
parent0a6130697e58cca0bea4038d984edf89ebc21668 (diff)
downloadpoky-8e138b7f2a38b55a95452cf0f54bfd320e8c59af.tar.gz
bitbake: 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] (Bitbake rev: d4b5796899c3ca5c7becd7322291afd8afb35a31) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/ui/toasterui.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index fec69621f1..2d443776ba 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -168,8 +168,23 @@ def main(server, eventHandler, params):
168 build_history_enabled = False 168 build_history_enabled = False
169 169
170 if not params.observe_only: 170 if not params.observe_only:
171 logger.error("ToasterUI can only work in observer mode") 171 params.updateFromServer(server)
172 return 1 172 params.updateToServer(server, os.environ.copy())
173 cmdline = params.parseActions()
174 if not cmdline:
175 print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
176 return 1
177 if 'msg' in cmdline and cmdline['msg']:
178 logger.error(cmdline['msg'])
179 return 1
180
181 ret, error = server.runCommand(cmdline['action'])
182 if error:
183 logger.error("Command '%s' failed: %s" % (cmdline, error))
184 return 1
185 elif ret != True:
186 logger.error("Command '%s' failed: returned %s" % (cmdline, ret))
187 return 1
173 188
174 # set to 1 when toasterui needs to shut down 189 # set to 1 when toasterui needs to shut down
175 main.shutdown = 0 190 main.shutdown = 0