Skip to contentSkip to conversation

rm_work: Speed up rootfs/populate_sdk removal

PATCH New Richard Purdie 1 participant 1 message Oct 24, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rm_work: Speed up rootfs/populate_sdk removal

Commands like bitbake X -c rootfs or bitbake X -c populate_sdk do not trigger rm_work to clean up the directories afterwards since it traditionally hooks onto do_build. This change means those two tasks now clean up after themselves. We use the cleandirs function attribute to handle this.

[YOCTO #6413]

meta/classes/rm_work.bbclass +13 -0
index f0f6d18..7b1ec17 100644
@@ -97,3 +97,16 @@ do_rm_work_all () {
 }
 do_rm_work_all[recrdeptask] = "do_rm_work"
 addtask rm_work_all after do_rm_work
+
+do_populate_sdk[postfuncs] += "rm_work_populatesdk"
+rm_work_populatesdk () {
+    :
+}
+rm_work_populatesdk[cleandirs] = "${WORKDIR}/sdk"
+
+do_rootfs[postfuncs] += "rm_work_rootfs"
+rm_work_rootfs () {
+    :
+}
+rm_work_rootfs[cleandirs] = "${WORKDIR}/rootfs"
+