Skip to contentSkip to conversation

utility-tasks: Set T to alternate location during do_clean

PATCH Richard Purdie 2 participants 2 messages Aug 17, 2012

lore
Share & tools
lore
#0 lore raw

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]

---

meta/classes/utility-tasks.bbclass +1 -0
index d150ec5..bb26eb7 100644
@@ -12,6 +12,7 @@ python do_listtasks() {
 
 CLEANFUNCS ?= ""
 
+T_task-clean = "${LOG_DIR}/cleanlogs/${PN}"
 addtask clean
 do_clean[nostamp] = "1"
 python do_clean() {
#1 lore raw
Quoted 1 line · Richard Purdie

+T_task-clean = "${LOG_DIR}/cleanlogs/${PN}"

Cheers Richard, this does the trick!

Regards,

Signature · 5 lines
  Jack Mitchell ([email protected])
  Embedded Systems Engineer
  http://www.embed.me.uk

--