For me, it would be natural to have the mender artifact name set to the same string as the image name generated in Yocto. Currently, I have to set MENDER_ARTIFACT_NAME manually in my local.conf file, which might not be consistent with the image name.
Is there an easy way to achieve this?
Try setting mender artifact name variable to:
"${IMAGE_BASENAME}-${MACHINE}"
Sorry, this does not work. When i set
MENDER_ARTIFACT_NAME="${IMAGE_BASENAME}-${MACHINE}"
in my local.conf (or the one generated by kas), I get
$ more moducop-cpu01/build/tmp/work/moducop_cpu01-tdx-linux/ci4rail-bringup-image/1.0-r0/rootfs/etc/mender/artifact_info
artifact_name=mender-artifact-info-moducop-cpu01
But the image base name should be Moducop-CPU01_Bringup-Image_CI.OS.LMP, not mender-artifact-info
i assume your images are named correctly in your deploy images directory?
the mender-artifact-info recipe is only expanding the MENDER_ARTIFACT_NAME variable, so maybe grep thru your layer/s/confs to see if anything else is setting the MENDER_ARTIFACT_NAME variable.
Also what version of yocto are you using?
Other than that try cleaning the mender-artifact-info recipe
bitbake -c clean mender-artifact-info
bitbake -c cleansstate mender-artifact-info