I have INHERIT += "rm_work" in my local.conf file, and this works great for normal builds. But when I create sdk's, all work directories for the nativesdk-* packages are left on disk. I guess this is not a bug, but due to the way rm_work.bbclass is implemented. It would be nice if there was a way of having rm_work.bbclass also cleanup work/ after generating an SDK. Discussions on the mailing list: http://thread.gmane.org/gmane.comp.handhelds.openembedded.core/50945 http://thread.gmane.org/gmane.comp.handhelds.openembedded.core/50971/focus=50966
What we could do is add to rm_work.bbclass: do_populate_sdk[postfuncs] += "rm_work_populatesdk" rm_work_populatesdk () { : } rm_work_populatesdk[cleandirs] = "${WORKDIR}/sdk" and probably something similar for do_rootfs too...
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=6476f0bf3dc189948fafedf6be112f875e42225f