summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-08 20:21:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-08 20:36:28 +0100
commit5b345d482f1d7d69d63e827310e9618a6cda91ef (patch)
tree9ae60181f7160b74146fccbd6f8d66a19d668817
parent70232a8abcc78cb239b6f9b1f42daf60d4f5b98b (diff)
downloadbitbake-5b345d482f1d7d69d63e827310e9618a6cda91ef.tar.gz
build/runqueue: Pass quieterrors flag around to supress errors at task execution time
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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))