Fixes for scenequeue task failure
cover Fixes for scenequeue task failure
After some more extensive testing, fix some regressions in scenequeue task failure handling caused by one of my earlier commits.
The following changes since commit 8f07bdc0a42dd7a7c3acf5d1b13220dbc98c8017:
image_types_uboot: Update to work after recent image_types changes (2012-02-29 18:25:03 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib paule/bb-sceneqtaskfail
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/bb-sceneqtaskfail
Paul Eggleton (3):
bitbake/runqueue: fix python error on scenequeue task failure bitbake/uihelper: restore line to record failed normal tasks bitbake/build: report TaskFailedSilent events as "Failed"
bitbake/lib/bb/build.py | 9 ++++++++- bitbake/lib/bb/runqueue.py | 3 +-- bitbake/lib/bb/ui/uihelper.py | 7 ++++++- 3 files changed, 15 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/3 bitbake/runqueue: fix python error on scenequeue task failure
Fixes a regression introduced in commit e8a3499c95a6d4f2b8fed002fb9504733c5be3c6 which resulted in a backtrace on setscene task failure due to trying to dereference the setscene task ID twice.
--- bitbake/lib/bb/runqueue.py | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
bitbake/lib/bb/runqueue.py +1 -2
@@ -1606,8 +1606,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): def task_fail(self, task, result): self.stats.taskFailed() - index = self.rqdata.runq_setscene[task] - bb.event.fire(sceneQueueTaskFailed(index, self.stats, result, self), self.cfgData) + bb.event.fire(sceneQueueTaskFailed(task, self.stats, result, self), self.cfgData) self.scenequeue_notcovered.add(task) self.scenequeue_updatecounters(task)
Signature · 1 line
1.7.5.4
PATCH 2/3 bitbake/uihelper: restore line to record failed normal tasks
In reply to Paul EggletonSave failed real (non-setscene) tasks to uihelper's failed task list. as before commit e8a3499c95a6d4f2b8fed002fb9504733c5be3c6. Currently this list is only used by the ncurses UI.
--- bitbake/lib/bb/ui/uihelper.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
bitbake/lib/bb/ui/uihelper.py +6 -1
@@ -32,8 +32,13 @@ class BBUIHelper: if isinstance(event, bb.build.TaskSucceeded): del self.running_tasks[event.pid] self.needUpdate = True - if isinstance(event, bb.build.TaskFailed) or isinstance(event, bb.build.TaskFailedSilent): + if isinstance(event, bb.build.TaskFailedSilent): del self.running_tasks[event.pid] + # Don't add to the failed tasks list since this is e.g. a setscene task failure + self.needUpdate = True + if isinstance(event, bb.build.TaskFailed): + del self.running_tasks[event.pid] + self.failed_tasks.append( { 'title' : "%s %s" % (event._package, event._task)}) self.needUpdate = True def getTasks(self):
Signature · 1 line
1.7.5.4
PATCH 3/3 bitbake/build: report TaskFailedSilent events as "Failed"
In reply to Paul EggletonThe change for setscene events to fire a TaskFailedSilent event instead of TaskFailed resulted in "FailedSilent" being reported in the task finish note log entry, which is not really desirable, so change it back to reporting "Failed" again.
--- bitbake/lib/bb/build.py | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
bitbake/lib/bb/build.py +8 -1
@@ -72,7 +72,7 @@ class TaskBase(event.Event): self._task = t self._package = d.getVar("PF", 1) event.Event.__init__(self) - self._message = "package %s: task %s: %s" % (d.getVar("PF", 1), t, bb.event.getName(self)[4:]) + self._message = "package %s: task %s: %s" % (d.getVar("PF", 1), t, self.getDisplayName()) def getTask(self): return self._task
@@ -80,6 +80,9 @@ class TaskBase(event.Event): def setTask(self, task): self._task = task + def getDisplayName(self): + return bb.event.getName(self)[4:] + task = property(getTask, setTask, None, "task property") class TaskStarted(TaskBase):
@@ -102,6 +105,10 @@ class TaskFailedSilent(TaskBase): self.logfile = logfile super(TaskFailedSilent, self).__init__(task, metadata) + def getDisplayName(self): + # Don't need to tell the user it was silent + return "Failed" + class TaskInvalid(TaskBase): def __init__(self, task, metadata):
Signature · 1 line
1.7.5.4
Richard Purdie
AppliedQuoted 7 lines · Paul Eggleton
After some more extensive testing, fix some regressions in scenequeue task failure handling caused by one of my earlier commits.
The following changes since commit
8f07bdc0a42dd7a7c3acf5d1b13220dbc98c8017:
image_types_uboot: Update to work after recentimage_typeschanges (2012-02-29 18:25:03 +0000)
Quoted 8 lines
are available in the git repository at:
git://git.yoctoproject.org/poky-contribpaule/bb-sceneqtaskfail
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/bb-sceneqtaskfailPaul Eggleton (3):
bitbake/runqueue: fix python error on scenequeue task failure bitbake/uihelper: restore line to record failed normal tasks bitbake/build: report TaskFailedSilent events as "Failed"
Merged to master, thanks.
Richard