diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/build.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index d6418e40b3..65b7fc000d 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -714,19 +714,23 @@ def _exec_task(fn, task, d, quieterr): | |||
714 | logger.debug2("Zero size logfn %s, removing", logfn) | 714 | logger.debug2("Zero size logfn %s, removing", logfn) |
715 | bb.utils.remove(logfn) | 715 | bb.utils.remove(logfn) |
716 | bb.utils.remove(loglink) | 716 | bb.utils.remove(loglink) |
717 | except bb.BBHandledException: | ||
718 | event.fire(TaskFailed(task, fn, logfn, localdata, True), localdata) | ||
719 | return 1 | ||
720 | except (Exception, SystemExit) as exc: | 717 | except (Exception, SystemExit) as exc: |
718 | handled = False | ||
719 | if isinstance(exc, bb.BBHandledException): | ||
720 | handled = True | ||
721 | |||
721 | if quieterr: | 722 | if quieterr: |
723 | if not handled: | ||
724 | logger.warning(repr(exc)) | ||
722 | event.fire(TaskFailedSilent(task, fn, logfn, localdata), localdata) | 725 | event.fire(TaskFailedSilent(task, fn, logfn, localdata), localdata) |
723 | else: | 726 | else: |
724 | errprinted = errchk.triggered | 727 | errprinted = errchk.triggered |
725 | # If the output is already on stdout, we've printed the information in the | 728 | # If the output is already on stdout, we've printed the information in the |
726 | # logs once already so don't duplicate | 729 | # logs once already so don't duplicate |
727 | if verboseStdoutLogging: | 730 | if verboseStdoutLogging or handled: |
728 | errprinted = True | 731 | errprinted = True |
729 | logger.error(repr(exc)) | 732 | if not handled: |
733 | logger.error(repr(exc)) | ||
730 | event.fire(TaskFailed(task, fn, logfn, localdata, errprinted), localdata) | 734 | event.fire(TaskFailed(task, fn, logfn, localdata, errprinted), localdata) |
731 | return 1 | 735 | return 1 |
732 | 736 | ||