]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
build/runqueue: Pass quieterrors flag around to supress errors at task execution...
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Jun 2011 19:21:42 +0000 (20:21 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Jun 2011 19:36:28 +0000 (20:36 +0100)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/build.py
lib/bb/runqueue.py

index 115957b6de58ca57ee5e7fe9f7f6cdd0210edc28..15ba9568ff070809063e571ebc8cbe981b46291b 100644 (file)
@@ -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):
index 2494cb2e902beb4062254420ac42d14a38751d70..db1d36d1c55aeca7ca89efa4f1ed2caba84caf70 100644 (file)
@@ -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))