<?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>15795</bug_id>
          
          <creation_ts>2025-03-12 18:24:28 +0000</creation_ts>
          <short_desc>Python library code changes don&apos;t cause rebuild, and trigger taskhash mismatch</short_desc>
          <delta_ts>2025-03-24 09:49:19 +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>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</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>5.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Watt">JPEWhacker</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101348</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2025-03-12 18:24:28 +0000</bug_when>
    <thetext>There appears to be a problem where bitbake will not detect that changes are made to python library code and recalculate hashes appropriately. This not only means that tasks aren&apos;t rerun when they should be, but also that taskhash mismatches can easily occur.

This appear to be easily reproduced with the following steps:

$ bitbake core-image-minimal

edit spdx30_tasks.py:create_spdx() by adding extra whitespace

$ bitbake core-image-minimal

Note that no tasks rerun, even though the task changed

invalidate and run an upstream task with:

$ bitbake -f --runall collect_spdx_deps core-image-minimal

Many task hash mismatch errors will occur</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101349</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-03-12 18:44:34 +0000</bug_when>
    <thetext>You can see this a little faster with:

bitbake core-image-minimal -c clean

bitbake core-image-minimal -S none

ls -1la tmp/stamps/qemux86_64-poky-linux/core-image-minimal/

&lt;edit spdx30_tasks.py:create_spdx() by adding extra whitespace&gt;

bitbake core-image-minimal -S none

ls -1la tmp/stamps/qemux86_64-poky-linux/core-image-minimal/

(shows the same as above)

rm tmp/cache/ -rf

bitbake core-image-minimal -S none

ls -1la tmp/stamps/qemux86_64-poky-linux/core-image-minimal/

shows duplicate sigdata files with new hashes (do_build for example changes)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101350</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-03-12 18:46:41 +0000</bug_when>
    <thetext>I think the problem is that whilst bitbake reparses it&apos;s configuration, we don&apos;t know when to reparse the recipes since we don&apos;t know which hashes of which functions make it into which recipes. This means we don&apos;t know whether to load a recipe&apos;s values from the cache or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101351</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-03-12 18:48:59 +0000</bug_when>
    <thetext>Put another way, if the overall checksum of &quot;lib&quot; changes at all, we need to invalidate the cache and reparse everything</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101362</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-03-13 13:34:35 +0000</bug_when>
    <thetext>The issue is the base configuration hash doesn&apos;t account for the module dependencies. I&apos;ve sent a patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101471</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-03-24 09:49:19 +0000</bug_when>
    <thetext>https://git.yoctoproject.org/poky/commit/?id=6610cad12a062592956257961a790ec6a3012b8b</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>