summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/bb/build.py22
-rw-r--r--lib/bb/runqueue.py4
2 files changed, 18 insertions, 8 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 115957b6d..15ba9568f 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -257,7 +257,7 @@ def _task_data(fn, task, d):
data.expandKeys(localdata)
return localdata
-def _exec_task(fn, task, d):
+def _exec_task(fn, task, d, quieterr):
"""Execute a BB 'task'
Execution of a task involves a bit more setup than executing a function,
@@ -322,8 +322,9 @@ def _exec_task(fn, task, d):
for func in (postfuncs or '').split():
exec_func(func, localdata)
except FuncFailed as exc:
- logger.error(str(exc))
- event.fire(TaskFailed(task, logfn, localdata), localdata)
+ if not quieterr:
+ logger.error(str(exc))
+ event.fire(TaskFailed(task, logfn, localdata), localdata)
return 1
finally:
sys.stdout.flush()
@@ -356,13 +357,18 @@ def _exec_task(fn, task, d):
def exec_task(fn, task, d):
try:
- return _exec_task(fn, task, d)
+ quieterr = False
+ if d.getVarFlag(task, "quieterrors") is not None:
+ quieterr = True
+
+ return _exec_task(fn, task, d, quieterr)
except Exception:
from traceback import format_exc
- logger.error("Build of %s failed" % (task))
- logger.error(format_exc())
- failedevent = TaskFailed(task, None, d)
- event.fire(failedevent, d)
+ if not quieterr:
+ logger.error("Build of %s failed" % (task))
+ logger.error(format_exc())
+ failedevent = TaskFailed(task, None, d)
+ event.fire(failedevent, d)
return 1
def stamp_internal(taskname, d, file_name):
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 2494cb2e9..db1d36d1c 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -1117,6 +1117,10 @@ class RunQueueExecute:
the_data.setVar("BBHASHDEPS_%s" % h, self.rqdata.hash_deps[h])
os.environ.update(bb.data.exported_vars(the_data))
+
+ if quieterrors:
+ the_data.setVarFlag(taskname, "quieterrors", "1")
+
except Exception as exc:
if not quieterrors:
logger.critical(str(exc))