Bug 6413

Summary: rm_work.bbclass does not play well with "-c populate_sdk" command
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jacob Kroon <jacob.kroon>
Component: configurationAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Low    
Version: unspecified   
Target Milestone: 1.8   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Jacob Kroon 2014-06-06 16:27:11 UTC
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
Comment 1 Richard Purdie 2014-09-24 16:42:47 UTC
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...