summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/knotty.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/knotty.py')
-rw-r--r--bitbake/lib/bb/ui/knotty.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index e1d42f7871..22370efc60 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -118,6 +118,8 @@ def main(server, eventHandler):
118 try: 118 try:
119 event = eventHandler.waitEvent(0.25) 119 event = eventHandler.waitEvent(0.25)
120 if event is None: 120 if event is None:
121 if shutdown > 1:
122 break
121 continue 123 continue
122 helper.eventHandler(event) 124 helper.eventHandler(event)
123 if isinstance(event, bb.runqueue.runQueueExitWait): 125 if isinstance(event, bb.runqueue.runQueueExitWait):
@@ -199,18 +201,18 @@ def main(server, eventHandler):
199 print("Loaded %d entries from dependency cache." % event.num_entries) 201 print("Loaded %d entries from dependency cache." % event.num_entries)
200 continue 202 continue
201 203
202 if isinstance(event, bb.command.CommandCompleted):
203 break
204 if isinstance(event, bb.command.CommandFailed): 204 if isinstance(event, bb.command.CommandFailed):
205 return_value = event.exitcode 205 return_value = event.exitcode
206 logger.error("Command execution failed: %s", event.error) 206 logger.error("Command execution failed: %s", event.error)
207 break 207 shutdown = 2
208 continue
208 if isinstance(event, bb.command.CommandExit): 209 if isinstance(event, bb.command.CommandExit):
209 if not return_value: 210 if not return_value:
210 return_value = event.exitcode 211 return_value = event.exitcode
211 continue 212 continue
212 if isinstance(event, bb.cooker.CookerExit): 213 if isinstance(event, (bb.command.CommandCompleted, bb.cooker.CookerExit)):
213 break 214 shutdown = 2
215 continue
214 if isinstance(event, bb.event.MultipleProviders): 216 if isinstance(event, bb.event.MultipleProviders):
215 logger.info("multiple providers are available for %s%s (%s)", event._is_runtime and "runtime " or "", 217 logger.info("multiple providers are available for %s%s (%s)", event._is_runtime and "runtime " or "",
216 event._item, 218 event._item,
@@ -269,9 +271,6 @@ def main(server, eventHandler):
269 if ioerror.args[0] == 4: 271 if ioerror.args[0] == 4:
270 pass 272 pass
271 except KeyboardInterrupt: 273 except KeyboardInterrupt:
272 if shutdown == 2:
273 print("\nThird Keyboard Interrupt, exit.\n")
274 break
275 if shutdown == 1: 274 if shutdown == 1:
276 print("\nSecond Keyboard Interrupt, stopping...\n") 275 print("\nSecond Keyboard Interrupt, stopping...\n")
277 server.runCommand(["stateStop"]) 276 server.runCommand(["stateStop"])