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.
" rm_work.bbclass: Exclude do_rootfs stamp removal" is on the list.
Should be fixed by http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=efc07c293695c21329442d69fe34411027416188 which is now in master.