summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-02-24 09:31:30 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-24 16:11:24 +0000
commitd02f7b4649bc7ad258301706bbbc696ce24de598 (patch)
treec8660738700e33a854871fdb7a90937e500cf3cf /bitbake
parente6230da00e3927cc7db006234a3deb536b9ef327 (diff)
downloadpoky-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.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index c24841ffcd..3ad0c0aa92 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1651,6 +1651,9 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
1651 logger.info("Running setscene task %d of %d (%s:%s)" % (self.stats.completed + self.stats.active + self.stats.failed + 1, 1651 logger.info("Running setscene task %d of %d (%s:%s)" % (self.stats.completed + self.stats.active + self.stats.failed + 1,
1652 self.stats.total, fn, taskname)) 1652 self.stats.total, fn, taskname))
1653 1653
1654 startevent = sceneQueueTaskStarted(task, self.stats, self.rq)
1655 bb.event.fire(startevent, self.cfgData)
1656
1654 pid, pipein, pipeout = self.fork_off_task(fn, realtask, taskname) 1657 pid, pipein, pipeout = self.fork_off_task(fn, realtask, taskname)
1655 1658
1656 self.build_pids[pid] = task 1659 self.build_pids[pid] = task
@@ -1718,6 +1721,14 @@ class runQueueTaskStarted(runQueueEvent):
1718 runQueueEvent.__init__(self, task, stats, rq) 1721 runQueueEvent.__init__(self, task, stats, rq)
1719 self.noexec = noexec 1722 self.noexec = noexec
1720 1723
1724class sceneQueueTaskStarted(runQueueEvent):
1725 """
1726 Event notifing a setscene task was started
1727 """
1728 def __init__(self, task, stats, rq, noexec=False):
1729 runQueueEvent.__init__(self, task, stats, rq)
1730 self.noexec = noexec
1731
1721class runQueueTaskFailed(runQueueEvent): 1732class runQueueTaskFailed(runQueueEvent):
1722 """ 1733 """
1723 Event notifing a task failed 1734 Event notifing a task failed
@@ -1726,12 +1737,13 @@ class runQueueTaskFailed(runQueueEvent):
1726 runQueueEvent.__init__(self, task, stats, rq) 1737 runQueueEvent.__init__(self, task, stats, rq)
1727 self.exitcode = exitcode 1738 self.exitcode = exitcode
1728 1739
1729class sceneQueueTaskFailed(runQueueTaskFailed): 1740class sceneQueueTaskFailed(runQueueEvent):
1730 """ 1741 """
1731 Event notifing a setscene task failed 1742 Event notifing a setscene task failed
1732 """ 1743 """
1733 def __init__(self, task, stats, exitcode, rq): 1744 def __init__(self, task, stats, exitcode, rq):
1734 runQueueTaskFailed.__init__(self, task, stats, exitcode, rq) 1745 runQueueEvent.__init__(self, task, stats, rq)
1746 self.exitcode = exitcode
1735 self.taskstring = rq.rqdata.get_user_idstring(task, "_setscene") 1747 self.taskstring = rq.rqdata.get_user_idstring(task, "_setscene")
1736 1748
1737class runQueueTaskCompleted(runQueueEvent): 1749class runQueueTaskCompleted(runQueueEvent):