<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14946</bug_id>
          
          <creation_ts>2022-10-25 08:25:10 +0000</creation_ts>
          <short_desc>Image rebuilds with rm_work result in missing license manifests</short_desc>
          <delta_ts>2026-10-21 07:31:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>deployment</component>
          <version>4.0.4</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christian Thießen">christian.thiessen</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>mathieu.dubois-briand</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>94239</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Thießen">christian.thiessen</who>
    <bug_when>2022-10-25 08:25:10 +0000</bug_when>
    <thetext>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+=&quot;rm_work&quot; 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&apos;s do_rootfs task (ROOTFS_POSTPROCESS_COMMAND:prepend = &quot;write_package_manifest; license_create_manifest; &quot; 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}-&lt;datetime&gt; 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}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102228</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-06-11 12:18:09 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104480</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-03-03 22:10:19 +0000</bug_when>
    <thetext>Probably still a problem, bump to 6.0-M4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105632</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-05-28 13:17:56 +0000</bug_when>
    <thetext>Bulk move of unassigned 6.0-M* bugs to 6.1-M2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107141</commentid>
    <comment_count>4</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2026-10-21 07:31:56 +0000</bug_when>
    <thetext>Fix merged: https://git.openembedded.org/openembedded-core/commit/?id=d931446dac36811ff08d610f5e5ab87b785840ef</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>