Skip to contentSkip to conversation

rm_work: Fix RM_WORK_EXCLUDE for image/sdk recipes

PATCH New Richard Purdie 1 participant 1 message Jan 7, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rm_work: Fix RM_WORK_EXCLUDE for image/sdk recipes

A previous change meant image/sdk recipes were removed unconditionally by the class and did not respect RM_WORK_EXCLUDE. This fixes that problem.

[YOCTO #7114]

meta/classes/rm_work.bbclass +8 -0
index 7b1ec17..e68d02a 100644
@@ -110,3 +110,11 @@ rm_work_rootfs () {
 }
 rm_work_rootfs[cleandirs] = "${WORKDIR}/rootfs"
 
+python () {
+    # If the recipe name is in the RM_WORK_EXCLUDE, skip the recipe.
+    excludes = (d.getVar("RM_WORK_EXCLUDE", True) or "").split()
+    pn = d.getVar("PN", True)
+    if pn in excludes:
+        d.delVarFlag('rm_work_rootfs', 'cleandirs')
+        d.delVarFlag('rm_work_populatesdk', 'cleandirs')
+}