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