summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/depexp.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/depexp.py')
-rw-r--r--bitbake/lib/bb/ui/depexp.py38
1 files changed, 25 insertions, 13 deletions
diff --git a/bitbake/lib/bb/ui/depexp.py b/bitbake/lib/bb/ui/depexp.py
index b62adbf851..1254128edd 100644
--- a/bitbake/lib/bb/ui/depexp.py
+++ b/bitbake/lib/bb/ui/depexp.py
@@ -198,17 +198,23 @@ class gtkthread(threading.Thread):
198 198
199def main(server, eventHandler): 199def main(server, eventHandler):
200 try: 200 try:
201 cmdline = server.runCommand(["getCmdLineAction"]) 201 cmdline, error = server.runCommand(["getCmdLineAction"])
202 if cmdline and not cmdline['action']: 202 if error:
203 print(cmdline['msg']) 203 print("Error getting bitbake commandline: %s" % error)
204 return 204 return 1
205 elif not cmdline or (cmdline['action'] and cmdline['action'][0] != "generateDotGraph"): 205 elif not cmdline:
206 print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
207 return 1
208 elif not cmdline or cmdline[0] != "generateDotGraph":
206 print("This UI is only compatible with the -g option") 209 print("This UI is only compatible with the -g option")
207 return 210 return 1
208 ret = server.runCommand(["generateDepTreeEvent", cmdline['action'][1], cmdline['action'][2]]) 211 ret, error = server.runCommand(["generateDepTreeEvent", cmdline[1], cmdline[2]])
209 if ret != True: 212 if error:
210 print("Couldn't run command! %s" % ret) 213 print("Error running command '%s': %s" % (cmdline, error))
211 return 214 return 1
215 elif ret != True:
216 print("Error running command '%s': returned %s" % (cmdline, ret))
217 return 1
212 except xmlrpclib.Fault as x: 218 except xmlrpclib.Fault as x:
213 print("XMLRPC Fault getting commandline:\n %s" % x) 219 print("XMLRPC Fault getting commandline:\n %s" % x)
214 return 220 return
@@ -229,7 +235,9 @@ def main(server, eventHandler):
229 try: 235 try:
230 event = eventHandler.waitEvent(0.25) 236 event = eventHandler.waitEvent(0.25)
231 if gtkthread.quit.isSet(): 237 if gtkthread.quit.isSet():
232 server.runCommand(["stateStop"]) 238 _, error = server.runCommand(["stateStop"])
239 if error:
240 print('Unable to cleanly stop: %s' % error)
233 break 241 break
234 242
235 if event is None: 243 if event is None:
@@ -302,9 +310,13 @@ def main(server, eventHandler):
302 break 310 break
303 if shutdown == 1: 311 if shutdown == 1:
304 print("\nSecond Keyboard Interrupt, stopping...\n") 312 print("\nSecond Keyboard Interrupt, stopping...\n")
305 server.runCommand(["stateStop"]) 313 _, error = server.runCommand(["stateStop"])
314 if error:
315 print('Unable to cleanly stop: %s' % error)
306 if shutdown == 0: 316 if shutdown == 0:
307 print("\nKeyboard Interrupt, closing down...\n") 317 print("\nKeyboard Interrupt, closing down...\n")
308 server.runCommand(["stateShutdown"]) 318 _, error = server.runCommand(["stateShutdown"])
319 if error:
320 print('Unable to cleanly shutdown: %s' % error)
309 shutdown = shutdown + 1 321 shutdown = shutdown + 1
310 pass 322 pass