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.py35
1 files changed, 28 insertions, 7 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 48e1223c6b..3390eb73ac 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -284,7 +284,7 @@ class TerminalFilter(object):
284 content = self.main_progress.update(progress) 284 content = self.main_progress.update(progress)
285 print('') 285 print('')
286 lines = 1 + int(len(content) / (self.columns + 1)) 286 lines = 1 + int(len(content) / (self.columns + 1))
287 if not self.quiet: 287 if self.quiet == 0:
288 for tasknum, task in enumerate(tasks[:(self.rows - 2)]): 288 for tasknum, task in enumerate(tasks[:(self.rows - 2)]):
289 if isinstance(task, tuple): 289 if isinstance(task, tuple):
290 pbar, progress, rate, start_time = task 290 pbar, progress, rate, start_time = task
@@ -353,10 +353,13 @@ def main(server, eventHandler, params, tf = TerminalFilter):
353 errconsole = logging.StreamHandler(sys.stderr) 353 errconsole = logging.StreamHandler(sys.stderr)
354 format_str = "%(levelname)s: %(message)s" 354 format_str = "%(levelname)s: %(message)s"
355 format = bb.msg.BBLogFormatter(format_str) 355 format = bb.msg.BBLogFormatter(format_str)
356 if params.options.quiet: 356 if params.options.quiet == 0:
357 bb.msg.addDefaultlogFilter(console, bb.msg.BBLogFilterStdOut, bb.msg.BBLogFormatter.WARNING) 357 forcelevel = None
358 elif params.options.quiet > 2:
359 forcelevel = bb.msg.BBLogFormatter.ERROR
358 else: 360 else:
359 bb.msg.addDefaultlogFilter(console, bb.msg.BBLogFilterStdOut) 361 forcelevel = bb.msg.BBLogFormatter.WARNING
362 bb.msg.addDefaultlogFilter(console, bb.msg.BBLogFilterStdOut, forcelevel)
360 bb.msg.addDefaultlogFilter(errconsole, bb.msg.BBLogFilterStdErr) 363 bb.msg.addDefaultlogFilter(errconsole, bb.msg.BBLogFilterStdErr)
361 console.setFormatter(format) 364 console.setFormatter(format)
362 errconsole.setFormatter(format) 365 errconsole.setFormatter(format)
@@ -506,35 +509,47 @@ def main(server, eventHandler, params, tf = TerminalFilter):
506 logger.info(event._message) 509 logger.info(event._message)
507 continue 510 continue
508 if isinstance(event, bb.event.ParseStarted): 511 if isinstance(event, bb.event.ParseStarted):
512 if params.options.quiet > 1:
513 continue
509 if event.total == 0: 514 if event.total == 0:
510 continue 515 continue
511 parseprogress = new_progress("Parsing recipes", event.total).start() 516 parseprogress = new_progress("Parsing recipes", event.total).start()
512 continue 517 continue
513 if isinstance(event, bb.event.ParseProgress): 518 if isinstance(event, bb.event.ParseProgress):
519 if params.options.quiet > 1:
520 continue
514 if parseprogress: 521 if parseprogress:
515 parseprogress.update(event.current) 522 parseprogress.update(event.current)
516 else: 523 else:
517 bb.warn("Got ParseProgress event for parsing that never started?") 524 bb.warn("Got ParseProgress event for parsing that never started?")
518 continue 525 continue
519 if isinstance(event, bb.event.ParseCompleted): 526 if isinstance(event, bb.event.ParseCompleted):
527 if params.options.quiet > 1:
528 continue
520 if not parseprogress: 529 if not parseprogress:
521 continue 530 continue
522 parseprogress.finish() 531 parseprogress.finish()
523 pasreprogress = None 532 pasreprogress = None
524 if not params.options.quiet: 533 if params.options.quiet == 0:
525 print(("Parsing of %d .bb files complete (%d cached, %d parsed). %d targets, %d skipped, %d masked, %d errors." 534 print(("Parsing of %d .bb files complete (%d cached, %d parsed). %d targets, %d skipped, %d masked, %d errors."
526 % ( event.total, event.cached, event.parsed, event.virtuals, event.skipped, event.masked, event.errors))) 535 % ( event.total, event.cached, event.parsed, event.virtuals, event.skipped, event.masked, event.errors)))
527 continue 536 continue
528 537
529 if isinstance(event, bb.event.CacheLoadStarted): 538 if isinstance(event, bb.event.CacheLoadStarted):
539 if params.options.quiet > 1:
540 continue
530 cacheprogress = new_progress("Loading cache", event.total).start() 541 cacheprogress = new_progress("Loading cache", event.total).start()
531 continue 542 continue
532 if isinstance(event, bb.event.CacheLoadProgress): 543 if isinstance(event, bb.event.CacheLoadProgress):
544 if params.options.quiet > 1:
545 continue
533 cacheprogress.update(event.current) 546 cacheprogress.update(event.current)
534 continue 547 continue
535 if isinstance(event, bb.event.CacheLoadCompleted): 548 if isinstance(event, bb.event.CacheLoadCompleted):
549 if params.options.quiet > 1:
550 continue
536 cacheprogress.finish() 551 cacheprogress.finish()
537 if not params.options.quiet: 552 if params.options.quiet == 0:
538 print("Loaded %d entries from dependency cache." % event.num_entries) 553 print("Loaded %d entries from dependency cache." % event.num_entries)
539 continue 554 continue
540 555
@@ -620,16 +635,22 @@ def main(server, eventHandler, params, tf = TerminalFilter):
620 continue 635 continue
621 636
622 if isinstance(event, bb.event.ProcessStarted): 637 if isinstance(event, bb.event.ProcessStarted):
638 if params.options.quiet > 1:
639 continue
623 parseprogress = new_progress(event.processname, event.total) 640 parseprogress = new_progress(event.processname, event.total)
624 parseprogress.start(False) 641 parseprogress.start(False)
625 continue 642 continue
626 if isinstance(event, bb.event.ProcessProgress): 643 if isinstance(event, bb.event.ProcessProgress):
644 if params.options.quiet > 1:
645 continue
627 if parseprogress: 646 if parseprogress:
628 parseprogress.update(event.progress) 647 parseprogress.update(event.progress)
629 else: 648 else:
630 bb.warn("Got ProcessProgress event for someting that never started?") 649 bb.warn("Got ProcessProgress event for someting that never started?")
631 continue 650 continue
632 if isinstance(event, bb.event.ProcessFinished): 651 if isinstance(event, bb.event.ProcessFinished):
652 if params.options.quiet > 1:
653 continue
633 if parseprogress: 654 if parseprogress:
634 parseprogress.finish() 655 parseprogress.finish()
635 parseprogress = None 656 parseprogress = None
@@ -701,7 +722,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
701 if return_value and errors: 722 if return_value and errors:
702 summary += pluralise("\nSummary: There was %s ERROR message shown, returning a non-zero exit code.", 723 summary += pluralise("\nSummary: There was %s ERROR message shown, returning a non-zero exit code.",
703 "\nSummary: There were %s ERROR messages shown, returning a non-zero exit code.", errors) 724 "\nSummary: There were %s ERROR messages shown, returning a non-zero exit code.", errors)
704 if summary and not params.options.quiet: 725 if summary and params.options.quiet == 0:
705 print(summary) 726 print(summary)
706 727
707 if interrupted: 728 if interrupted: