Since we did the rewrite of our image and SDK generation in python, we have lost the variable dependencies between some of the variables that feed into these functions and the functions themselves, which means that changing the value of one of those variables doesn't cause the task to re-execute. We should add explicit vardeps on these to fix this. For do_rootfs we need to add vardeps on: IMAGE_PREPROCESS_COMMAND IMAGE_POSTPROCESS_COMMAND ROOTFS_PREPROCESS_COMMAND ROOTFS_POSTINSTALL_COMMAND ROOTFS_POSTPROCESS_COMMAND OPKG_PREPROCESS_COMMANDS OPKG_POSTPROCESS_COMMANDS RPM_POSTPROCESS_COMMANDS RPM_PREPROCESS_COMMANDS DEB_POSTPROCESS_COMMANDS DEB_PREPROCESS_COMMANDS (the latter two aren't actually implemented at the moment, but we might as well add them at the same time) For do_populate_sdk we need to add vardeps on: SDK_POSTPROCESS_COMMAND POPULATE_SDK_POST_TARGET_COMMAND POPULATE_SDK_POST_HOST_COMMAND
If you look at _depends_list() in lib/oe/rootfs.py, you'll see that at least some of these do have dependencies. We therefore need to figure out which ones are missing.
Right, I'd completely missed that, and most of the variables I've listed (if not all, I haven't gone through and checked every one) seem to be covered by that mechanism, which suggests it may not be working according to the reports I have received.
I've encountered issues where changes to IMAGE_PREPROCESS_COMMAND-functions does not trigger a rebuild. IMAGE_PREPROCESS_COMMAND += "test; " test() { install -m 0755 ${DEPLOY_DIR_IMAGE}/${DTB_FILENAME} ${IMAGE_ROOTFS} } If test() is changed, Bitbake does not re-trigger build unless I explicitly taint the sstate-cache (-f).
After some digging, I can confirm that we do have code not only to add these variables (all of them) as dependencies of do_rootfs but also we get the functions as dependencies for the variables, so I think we do have the mechanism already as Richard pointed out. Magnus, I've tried the exact example you gave on both master and dizzy and haven't been able to reproduce the issue - changing the contents of the function causes do_rootfs to re-execute the next time I build the image. Is there something else going on in your setup that I'm not replicating?
I've been unable to reproduce this on Dizzy, it seems to an issue on Daisy only. Fixed in oe-core b8b6214b885a0757f0e628937f8fe21c92c45155 by [YOCTO #6502]. *** This bug has been marked as a duplicate of bug 6502 ***