diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2012-02-24 09:31:30 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-24 16:11:24 +0000 |
commit | d02f7b4649bc7ad258301706bbbc696ce24de598 (patch) | |
tree | c8660738700e33a854871fdb7a90937e500cf3cf /bitbake | |
parent | e6230da00e3927cc7db006234a3deb536b9ef327 (diff) | |
download | ast2050-yocto-poky-d02f7b4649bc7ad258301706bbbc696ce24de598.zip ast2050-yocto-poky-d02f7b4649bc7ad258301706bbbc696ce24de598.tar.gz |
runqueue: fire sceneQueueTaskStarted event when a setscene queue starts
The current code prints a log when a setscene task starts, therefore
the progressbar in hob will not receive it. Use a sceneQueueTaskStarted
event instead.
Besides, change the sceneQueueTaskFailed event to inherit runQueueEvent
directly to avoid confusion to event receiver.
(Bitbake rev: 7c07cc93d6558d7d9c3144b13493901b7ebae050)
Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index c24841f..3ad0c0a 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -1651,6 +1651,9 @@ class RunQueueExecuteScenequeue(RunQueueExecute): logger.info("Running setscene task %d of %d (%s:%s)" % (self.stats.completed + self.stats.active + self.stats.failed + 1, self.stats.total, fn, taskname)) + startevent = sceneQueueTaskStarted(task, self.stats, self.rq) + bb.event.fire(startevent, self.cfgData) + pid, pipein, pipeout = self.fork_off_task(fn, realtask, taskname) self.build_pids[pid] = task @@ -1718,6 +1721,14 @@ class runQueueTaskStarted(runQueueEvent): runQueueEvent.__init__(self, task, stats, rq) self.noexec = noexec +class sceneQueueTaskStarted(runQueueEvent): + """ + Event notifing a setscene task was started + """ + def __init__(self, task, stats, rq, noexec=False): + runQueueEvent.__init__(self, task, stats, rq) + self.noexec = noexec + class runQueueTaskFailed(runQueueEvent): """ Event notifing a task failed @@ -1726,12 +1737,13 @@ class runQueueTaskFailed(runQueueEvent): runQueueEvent.__init__(self, task, stats, rq) self.exitcode = exitcode -class sceneQueueTaskFailed(runQueueTaskFailed): +class sceneQueueTaskFailed(runQueueEvent): """ Event notifing a setscene task failed """ def __init__(self, task, stats, exitcode, rq): - runQueueTaskFailed.__init__(self, task, stats, exitcode, rq) + runQueueEvent.__init__(self, task, stats, rq) + self.exitcode = exitcode self.taskstring = rq.rqdata.get_user_idstring(task, "_setscene") class runQueueTaskCompleted(runQueueEvent): |