Skip to contentSkip to conversation

is 'T_task-clean = "${LOG_DIR}/cleanlogs/${PN}"' still relevant?

DISCUSSION Robert P. J. Day 2 participants 2 messages Mar 21, 2021

lore
Share & tools
lore
#0 lore raw

perusing some of the content in meta/classes/utility-tasks.bbclass,
and i see the snippet:

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

which takes one all the way back to 2012:

commit eef9d6c2d52f5264a6e7a9d882f8323f9793fd7f
Author: Richard Purdie <[email protected]>
Date: Fri Aug 17 14:19:22 2012 +0100

utility-tasks: Set T to alternate location during do_clean

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.

does that race condition still exist?

rday

#1 lore raw
Quoted 13 lines · Robert P. J. Day

  perusing some of the content in meta/classes/utility-tasks.bbclass, and i see the snippet:

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

which takes one all the way back to 2012:

  commit eef9d6c2d52f5264a6e7a9d882f8323f9793fd7f
  Author: Richard Purdie <[email protected]>
  Date: Fri Aug 17 14:19:22 2012 +0100

    utility-tasks: Set T to alternate location during do_clean

Quoted 8 lines

    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.

does that race condition still exist?

Yes.

Cheers,

Richard