diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/build.py | 10 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 18 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 9 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/uihelper.py | 3 |
4 files changed, 32 insertions, 8 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index e85d7c4..b7031ab 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -96,6 +96,12 @@ class TaskFailed(TaskBase): self.errprinted = errprinted super(TaskFailed, self).__init__(task, metadata) +class TaskFailedSilent(TaskBase): + """Task execution failed (silently)""" + def __init__(self, task, logfile, metadata): + self.logfile = logfile + super(TaskFailedSilent, self).__init__(task, metadata) + class TaskInvalid(TaskBase): def __init__(self, task, metadata): @@ -334,7 +340,9 @@ def _exec_task(fn, task, d, quieterr): for func in (postfuncs or '').split(): exec_func(func, localdata) except FuncFailed as exc: - if not quieterr: + if quieterr: + event.fire(TaskFailedSilent(task, logfn, localdata), localdata) + else: errprinted = errchk.triggered logger.error(str(exc)) event.fire(TaskFailed(task, logfn, localdata, errprinted), localdata) diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 0e5d5c3..d4b2cd4 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -1724,6 +1724,15 @@ class runQueueEvent(bb.event.Event): self.stats = stats.copy() bb.event.Event.__init__(self) +class sceneQueueEvent(runQueueEvent): + """ + Base sceneQueue event class + """ + def __init__(self, task, stats, rq, noexec=False): + runQueueEvent.__init__(self, task, stats, rq) + realtask = rq.rqdata.runq_setscene[task] + self.taskstring = rq.rqdata.get_user_idstring(realtask, "_setscene") + class runQueueTaskStarted(runQueueEvent): """ Event notifing a task was started @@ -1732,12 +1741,12 @@ class runQueueTaskStarted(runQueueEvent): runQueueEvent.__init__(self, task, stats, rq) self.noexec = noexec -class sceneQueueTaskStarted(runQueueEvent): +class sceneQueueTaskStarted(sceneQueueEvent): """ Event notifing a setscene task was started """ def __init__(self, task, stats, rq, noexec=False): - runQueueEvent.__init__(self, task, stats, rq) + sceneQueueEvent.__init__(self, task, stats, rq) self.noexec = noexec class runQueueTaskFailed(runQueueEvent): @@ -1748,14 +1757,13 @@ class runQueueTaskFailed(runQueueEvent): runQueueEvent.__init__(self, task, stats, rq) self.exitcode = exitcode -class sceneQueueTaskFailed(runQueueEvent): +class sceneQueueTaskFailed(sceneQueueEvent): """ Event notifing a setscene task failed """ def __init__(self, task, stats, exitcode, rq): - runQueueEvent.__init__(self, task, stats, rq) + sceneQueueEvent.__init__(self, task, stats, rq) self.exitcode = exitcode - self.taskstring = rq.rqdata.get_user_idstring(task, "_setscene") class runQueueTaskCompleted(runQueueEvent): """ diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index e2e6ac3..14989d4 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -238,6 +238,10 @@ def main(server, eventHandler): logger.error("%s", reason) continue + if isinstance(event, bb.runqueue.sceneQueueTaskStarted): + logger.info("Running setscene task %d of %d (%s)" % (event.stats.completed + event.stats.active + event.stats.failed + 1, event.stats.total, event.taskstring)) + continue + if isinstance(event, bb.runqueue.runQueueTaskStarted): if event.noexec: tasktype = 'noexec task' @@ -256,6 +260,11 @@ def main(server, eventHandler): event.taskid, event.taskstring, event.exitcode) continue + if isinstance(event, bb.runqueue.sceneQueueTaskFailed): + logger.warn("Setscene task %s (%s) failed with exit code '%s' - real task will be run instead", + event.taskid, event.taskstring, event.exitcode) + continue + # ignore if isinstance(event, (bb.event.BuildBase, bb.event.StampUpdate, diff --git a/bitbake/lib/bb/ui/uihelper.py b/bitbake/lib/bb/ui/uihelper.py index bbf5135..4116dab 100644 --- a/bitbake/lib/bb/ui/uihelper.py +++ b/bitbake/lib/bb/ui/uihelper.py @@ -32,9 +32,8 @@ class BBUIHelper: if isinstance(event, bb.build.TaskSucceeded): del self.running_tasks[event.pid] self.needUpdate = True - if isinstance(event, bb.build.TaskFailed): + if isinstance(event, bb.build.TaskFailed) or isinstance(event, bb.build.TaskFailedSilent): del self.running_tasks[event.pid] - self.failed_tasks.append( { 'title' : "%s %s" % (event._package, event._task)}) self.needUpdate = True def getTasks(self): |