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, 10 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 7370a1adfd..431baa15ef 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -631,7 +631,12 @@ def main(server, eventHandler, params, tf = TerminalFilter):
631 termfilter = tf(main, helper, console_handlers, params.options.quiet) 631 termfilter = tf(main, helper, console_handlers, params.options.quiet)
632 atexit.register(termfilter.finish) 632 atexit.register(termfilter.finish)
633 633
634 while main.shutdown < 2: 634 # shutdown levels
635 # 0 - normal operation
636 # 1 - no new task execution, let current running tasks finish
637 # 2 - interrupting currently executing tasks
638 # 3 - we're done, exit
639 while main.shutdown < 3:
635 try: 640 try:
636 if (lastprint + printinterval) <= time.time(): 641 if (lastprint + printinterval) <= time.time():
637 termfilter.keepAlive(printinterval) 642 termfilter.keepAlive(printinterval)
@@ -644,7 +649,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
644 termfilter.clearFooter() 649 termfilter.clearFooter()
645 print("No reply after pinging server (%s, %s), exiting." % (str(error), str(ret))) 650 print("No reply after pinging server (%s, %s), exiting." % (str(error), str(ret)))
646 return_value = 3 651 return_value = 3
647 main.shutdown = 2 652 main.shutdown = 3
648 lastevent = time.time() 653 lastevent = time.time()
649 if not parseprogress: 654 if not parseprogress:
650 termfilter.updateFooter() 655 termfilter.updateFooter()
@@ -756,15 +761,15 @@ def main(server, eventHandler, params, tf = TerminalFilter):
756 if event.error: 761 if event.error:
757 errors = errors + 1 762 errors = errors + 1
758 logger.error(str(event)) 763 logger.error(str(event))
759 main.shutdown = 2 764 main.shutdown = 3
760 continue 765 continue
761 if isinstance(event, bb.command.CommandExit): 766 if isinstance(event, bb.command.CommandExit):
762 if not return_value: 767 if not return_value:
763 return_value = event.exitcode 768 return_value = event.exitcode
764 main.shutdown = 2 769 main.shutdown = 3
765 continue 770 continue
766 if isinstance(event, (bb.command.CommandCompleted, bb.cooker.CookerExit)): 771 if isinstance(event, (bb.command.CommandCompleted, bb.cooker.CookerExit)):
767 main.shutdown = 2 772 main.shutdown = 3
768 continue 773 continue
769 if isinstance(event, bb.event.MultipleProviders): 774 if isinstance(event, bb.event.MultipleProviders):
770 logger.info(str(event)) 775 logger.info(str(event))