See also the previous discussion at https://lists.openembedded.org/g/openembedded-core/topic/94530086 . Preconditions/Environment ------------------------- Set up just about any build based on Yocto kirkstone, e.g. core-image-minimal for intel-corei7-64. Add INHERIT+="rm_work" to local.conf. Triggering Action/Cause ----------------------- Build the image, then run the build again Expectation ----------- After each build, build/tmp/deploy/licenses/${IMAGE}-${MACHINE} contains image_license.manifest, license.manifest and package.manifest. This is important for CI builds because I need to deploy the image and manifest files to our artifact repository under the same build ID. Actual Result ------------- After the rebuild, build/tmp/deploy/licenses/${IMAGE}-${MACHINE} only contains image_license.manifest. license.manifest and package.manifest are mising. Reproducibility --------------- 5/5 Findings as of now ------------------ The missing files are supposed to be generated by are generated by the image's do_rootfs task (ROOTFS_POSTPROCESS_COMMAND:prepend = "write_package_manifest; license_create_manifest; " in poky/meta/classes/license_image.bbclass). When rm_work is enabled, bitbake reruns at minimum three tasks: bitbake will rerun three tasks: populate_lic_deploy, rm_work and build. This creates a new build/tmp/deploy/licenses/${IMAGE}-${MACHINE}-<datetime> directory and updates the symlink, but only recreates image_license.manifest in that new directory. Possible workarounds -------------------- Force running the do_rootfs task of the image recipe with bitbake -C. Exclude the image recipe from rm_work using RM_WORK_EXCLUDE. Always delete the whole /tmp before (CI) builds. Possible solutions ------------------ Move the manifest creation to a different point in the build process. Instead of a symlink to timestamped directories, make build/tmp/deploy/licenses/${IMAGE}-${MACHINE} a proper directory containing timestamped files and a non-timestamped symlink to each file, similar to build/tmp/deploy/images/${MACHINE}
I can replicate with walnascar. Do a build with rm_work and these files exist in deploy: ./licenses/qemuarm64/core-image-minimal-qemuarm64.rootfs-20250611113346/license.manifest ./licenses/qemuarm64/core-image-minimal-qemuarm64.rootfs-20250611113346/package.manifest ./licenses/qemuarm64/core-image-minimal-qemuarm64.rootfs-20250611113346/image_license.manifest Re-run bitbake: /licenses/qemuarm64/core-image-minimal-qemuarm64.rootfs-20250611121342/image_license.manifest ./licenses/qemuarm64/core-image-minimal-qemuarm64.rootfs-20250611113346/license.manifest ./licenses/qemuarm64/core-image-minimal-qemuarm64.rootfs-20250611113346/package.manifest ./licenses/qemuarm64/core-image-minimal-qemuarm64.rootfs-20250611113346/image_license.manifest The three old files exist, but only one for the new image.
Probably still a problem, bump to 6.0-M4.
Bulk move of unassigned 6.0-M* bugs to 6.1-M2.
Fix merged: https://git.openembedded.org/openembedded-core/commit/?id=d931446dac36811ff08d610f5e5ab87b785840ef