utility-tasks: Set T to alternate location during do_clean

Submitted by Richard Purdie on Aug. 17, 2012, 1:19 p.m. | Patch ID: 34821


Message ID 1345209562.27428.5.camel@ted
State Accepted
Commit eef9d6c2d52f5264a6e7a9d882f8323f9793fd7f
Headers show

Commit Message

Richard Purdie Aug. 17, 2012, 1:19 p.m.
There is a race where do_clean tries to clean WORKDIR but there are logfiles
written into ${T} by bitbake and this can lead to exceptions due to open files.

The easiest solution is to redirect T to a different location for the do_clean
task, hence avoiding the errors and also allowing the logfiles to be visible
somewhere. ${LOG_DIR} seems an appropriate place for this.

[YOCTO #2846]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Patch hide | download patch | download mbox

diff --git a/meta/classes/utility-tasks.bbclass b/meta/classes/utility-tasks.bbclass
index d150ec5..bb26eb7 100644
--- a/meta/classes/utility-tasks.bbclass
+++ b/meta/classes/utility-tasks.bbclass
@@ -12,6 +12,7 @@  python do_listtasks() {
+T_task-clean = "${LOG_DIR}/cleanlogs/${PN}"
 addtask clean
 do_clean[nostamp] = "1"
 python do_clean() {


ml@communistcode.co.uk Aug. 17, 2012, 1:33 p.m.
On 17/08/12 14:19, Richard Purdie wrote:
> +T_task-clean = "${LOG_DIR}/cleanlogs/${PN}"

Cheers Richard, this does the trick!