Bug 8557

Summary: rootfs images are always rebuilt when rm_work is inherited
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jin <jin>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact: Alexandru Georgescu <alexandru.c.georgescu>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, bluelightning, meta.mr.watcher, meta.watcher
Version: unspecified   
Target Milestone: 2.1 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Jin 2015-10-22 14:20:06 UTC
I do not know if this is a bug or a feature, decided to submit it after a chat in #oe on IRC.

I'm auto-building a rootfs via a cron script and I was expecting that it only gets built if any of its dependencies have changed. Currently the build always produces a new rootfs image.

I got some help on IRC and we figured out that the behaviour is different when rm_work is not inherited, in this case the image is not being built if no changes took place.

After adding  RM_WORK_EXCLUDE = "my_image_name" in local.conf I got the desired result - now a new image is only generated when its dependencies have changed.

So my question is: is it a bug or a feature? I'd expect the behaviour to be the same regardless of the rm_work inheritance.

P.S. is RM_WORK_EXCLUDE += "${PN}" directly in the image recipe supposed to work? It didn't, only the setting in local.conf did the trick.
Comment 1 Ross Burton 2015-11-12 15:28:27 UTC
"    rm_work.bbclass: Exclude do_rootfs stamp removal" is on the list.
Comment 2 Paul Eggleton 2015-11-17 17:21:59 UTC
Should be fixed by http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=efc07c293695c21329442d69fe34411027416188 which is now in master.