aboutsummaryrefslogtreecommitdiffstats
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):
def main(server, eventHandler):
try:
- cmdline = server.runCommand(["getCmdLineAction"])
- if cmdline and not cmdline['action']:
- print(cmdline['msg'])
- return
- elif not cmdline or (cmdline['action'] and cmdline['action'][0] != "generateDotGraph"):
+ cmdline, error = server.runCommand(["getCmdLineAction"])
+ if error:
+ print("Error getting bitbake commandline: %s" % error)
+ return 1
+ elif not cmdline:
+ print("Nothing to do. Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
+ return 1
+ elif not cmdline or cmdline[0] != "generateDotGraph":
print("This UI is only compatible with the -g option")
- return
- ret = server.runCommand(["generateDepTreeEvent", cmdline['action'][1], cmdline['action'][2]])
- if ret != True:
- print("Couldn't run command! %s" % ret)
- return
+ return 1
+ ret, error = server.runCommand(["generateDepTreeEvent", cmdline[1], cmdline[2]])
+ if error:
+ print("Error running command '%s': %s" % (cmdline, error))
+ return 1
+ elif ret != True:
+ print("Error running command '%s': returned %s" % (cmdline, ret))
+ return 1
except xmlrpclib.Fault as x:
print("XMLRPC Fault getting commandline:\n %s" % x)
return
@@ -229,7 +235,9 @@ def main(server, eventHandler):
try:
event = eventHandler.waitEvent(0.25)
if gtkthread.quit.isSet():
- server.runCommand(["stateStop"])
+ _, error = server.runCommand(["stateStop"])
+ if error:
+ print('Unable to cleanly stop: %s' % error)
break
if event is None:
@@ -302,9 +310,13 @@ def main(server, eventHandler):
break
if shutdown == 1:
print("\nSecond Keyboard Interrupt, stopping...\n")
- server.runCommand(["stateStop"])
+ _, error = server.runCommand(["stateStop"])
+ if error:
+ print('Unable to cleanly stop: %s' % error)
if shutdown == 0:
print("\nKeyboard Interrupt, closing down...\n")
- server.runCommand(["stateShutdown"])
+ _, error = server.runCommand(["stateShutdown"])
+ if error:
+ print('Unable to cleanly shutdown: %s' % error)
shutdown = shutdown + 1
pass