Minor sstate-related fixes
cover Minor sstate-related fixes
From: Paul Eggleton <[email protected]>
These patches fix two potential sources of problems with sstate stamp file handling and one error message issue for setscene tasks. They are not urgent for the 1.0 release but may be desirable.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: paule/sstate-fixes
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=paule/sstate-fixes
Thanks,
Paul Eggleton <[email protected]>
---
Paul Eggleton (3):
sstate.bbclass: avoid deleting unrelated stamp files sstate.bbclass: always delete stamp files in sstate_clean bitbake/runqueue: show correct task name for setscene task failure
bitbake/lib/bb/runqueue.py | 14 +++++++++++--- meta/classes/sstate.bbclass | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 13 deletions(-)
PATCH 1/3 sstate.bbclass: avoid deleting unrelated stamp files
From: Paul Eggleton <[email protected]>
Avoid deleting stamp files whose names contain the current task's name as a substring. This will be especially important for example if do_package_write is ever made an sstate task (as it would previously have deleted the stamps here for do_package_write_ipk etc.)
--- meta/classes/sstate.bbclass | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
meta/classes/sstate.bbclass +3 -1
@@ -241,7 +241,9 @@ def sstate_clean(ss, d): for lock in locks: bb.utils.unlockfile(lock) - oe.path.remove(d.getVar("STAMP", True) + ".do_" + ss['task'] + "*") + stfile = d.getVar("STAMP", True) + ".do_" + ss['task'] + oe.path.remove(stfile) + oe.path.remove(stfile + ".*") CLEANFUNCS += "sstate_cleanall"
Signature · 1 line
1.7.1
PATCH 2/3 sstate.bbclass: always delete stamp files in sstate_clean
In reply to Paul EggletonFrom: Paul Eggleton <[email protected]>
For safety, always delete the stamp files in sstate_clean regardless of whether the manifest file exists or not.
--- meta/classes/sstate.bbclass | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-)
meta/classes/sstate.bbclass +7 -9
@@ -229,17 +229,15 @@ def sstate_clean(ss, d): manifest = bb.data.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'], d) - if not os.path.exists(manifest): - return + if os.path.exists(manifest): + locks = [] + for lock in ss['lockfiles']: + locks.append(bb.utils.lockfile(lock)) - locks = [] - for lock in ss['lockfiles']: - locks.append(bb.utils.lockfile(lock)) + sstate_clean_manifest(manifest, d) - sstate_clean_manifest(manifest, d) - - for lock in locks: - bb.utils.unlockfile(lock) + for lock in locks: + bb.utils.unlockfile(lock) stfile = d.getVar("STAMP", True) + ".do_" + ss['task'] oe.path.remove(stfile)
Signature · 1 line
1.7.1
PATCH 3/3 bitbake/runqueue: show correct task name for setscene task failure
In reply to Paul EggletonFrom: Paul Eggleton <[email protected]>
If a setscene task failed previously it was showing an incorrect task name in the error line. This patch ensures we show the correct name, also including the "_setscene" suffix.
--- bitbake/lib/bb/runqueue.py | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-)
bitbake/lib/bb/runqueue.py +11 -3
@@ -204,9 +204,9 @@ class RunQueueData: ret.extend([nam]) return ret - def get_user_idstring(self, task): + def get_user_idstring(self, task, task_name_suffix = ""): fn = self.taskData.fn_index[self.runq_fnid[task]] - taskname = self.runq_task[task] + taskname = self.runq_task[task] + task_name_suffix return "%s, %s" % (fn, taskname) def get_task_id(self, fnid, taskname):
@@ -1483,7 +1483,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute): def task_fail(self, task, result): self.stats.taskFailed() index = self.rqdata.runq_setscene[task] - bb.event.fire(runQueueTaskFailed(task, self.stats, result, self), self.cfgData) + bb.event.fire(sceneQueueTaskFailed(index, self.stats, result, self), self.cfgData) self.scenequeue_notcovered.add(task) self.scenequeue_updatecounters(task)
@@ -1616,6 +1616,14 @@ class runQueueTaskFailed(runQueueEvent): runQueueEvent.__init__(self, task, stats, rq) self.exitcode = exitcode +class sceneQueueTaskFailed(runQueueTaskFailed): + """ + Event notifing a setscene task failed + """ + def __init__(self, task, stats, exitcode, rq): + runQueueTaskFailed.__init__(self, task, stats, exitcode, rq) + self.taskstring = rq.rqdata.get_user_idstring(task, "_setscene") + class runQueueTaskCompleted(runQueueEvent): """ Event notifing a task completed
Signature · 1 line
1.7.1
Richard Purdie
AppliedQuoted 15 lines · Paul Eggleton
From: Paul Eggleton <[email protected]>
These patches fix two potential sources of problems with sstate stamp file handling and one error message issue for setscene tasks. They are not urgent for the 1.0 release but may be desirable.
Pull URL:
git://git.pokylinux.org/poky-contrib.git
Branch: paule/sstate-fixes
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=paule/sstate-fixesThanks,
Paul Eggleton <[email protected]>
---
Quoted 8 lines
Paul Eggleton (3):
sstate.bbclass: avoid deleting unrelated stamp files sstate.bbclass: always delete stamp files insstate_cleanbitbake/runqueue: show correct task name for setscene task failurebitbake/lib/bb/runqueue.py | 14 +++++++++++--- meta/classes/sstate.bbclass | 20 ++++++++++---------- 2 files changed, 21 insertions(+), 13 deletions(-)
I've merged these patches, thanks!
Richard