Starting with 2.1 release and its in master too as of now, when we have a python snippet which uses DATE, TIME or DATETIME variables in python functions including anon python then we invariably end up with taskhash mismatch errors A reproducer is to patch core-image-minimal.bb like below diff --git a/meta/recipes-core/images/core-image-minimal.bb b/meta/recipes-core/images/core-image-minimal.bb index 8dd77b3..86f7621 100644 --- a/meta/recipes-core/images/core-image-minimal.bb +++ b/meta/recipes-core/images/core-image-minimal.bb @@ -10,3 +10,10 @@ inherit core-image IMAGE_ROOTFS_SIZE ?= "8192" IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "" ,d)}" + +def tweak_image_name(d): + stamp = d.getVar("DATE", True) + d.getVar("TIME", True) + image_name = '{time}'.format(time=stamp) + return image_name + +IMAGE_NAME_append = "${@tweak_image_name(d)}" # bitbake core-image-minimal ERROR: core-image-minimal-1.0-r0 do_rootfs: Taskhash mismatch e127e0ce1f106a20482b009a07b021e7 versus fb614e76c2fbb26419779b54e857d93c for /mnt/oe/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_rootfs ERROR: Taskhash mismatch e127e0ce1f106a20482b009a07b021e7 versus fb614e76c2fbb26419779b54e857d93c for /mnt/oe/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_rootfs ERROR: core-image-minimal-1.0-r0 do_image_tar: Taskhash mismatch d8d67c7a1c94a8f6328134a7ac6574ce versus 4c2d49ca06f4a09a61494477bb27e2ce for /mnt/oe/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_image_tar ERROR: Taskhash mismatch d8d67c7a1c94a8f6328134a7ac6574ce versus 4c2d49ca06f4a09a61494477bb27e2ce for /mnt/oe/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_image_tar ERROR: core-image-minimal-1.0-r0 do_image_ext4: Taskhash mismatch b35eee6836cd23f0c45bc7e4dc050fd1 versus 97fa0aef206608f29c70b0fd6a103dce for /mnt/oe/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_image_ext4 ERROR: Taskhash mismatch b35eee6836cd23f0c45bc7e4dc050fd1 versus 97fa0aef206608f29c70b0fd6a103dce for /mnt/oe/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_image_ext4 ERROR: core-image-minimal-1.0-r0 do_image_complete: Taskhash mismatch 0de34eecc8ccd0251e09e87f7d95b234 versus f13fa8ad05b7179739bf14cda38fe203 for /mnt/oe/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_image_complete ERROR: Taskhash mismatch 0de34eecc8ccd0251e09e87f7d95b234 versus f13fa8ad05b7179739bf14cda38fe203 for /mnt/oe/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_image_complete
The problem seems to be that vardepsexclude does not work either added tweak_image_name[vardepsexclude] += "DATE TIME" Still same errors.
workaround I found was to use DATETIME instead of DATE and TIME
This is not a regression, the problem always existed, we just more recently added warnings to bitbake so the user could know when there is a problem. We did go through and add various vardepexclude flags to the metadata around that time to avoid various warnings. Using the vardepsexclude flag is the correct way to fix things. We can't exclude DATETIME/DATE/TIME by default since sometimes these are intended so the function *does* run every time.