<?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>15493</bug_id>
          
          <creation_ts>2024-05-24 13:59:50 +0000</creation_ts>
          <short_desc>sstate reuse not as ideal as it should be</short_desc>
          <delta_ts>2024-05-30 14:34:58 +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>core</component>
          <version>0.0.0</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>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.0.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tgamblin</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>99077</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-05-24 13:59:50 +0000</bug_when>
    <thetext>I had a world build complete then came back and ran another build the next day having only made bitbake changes:

https://valkyrie.yoctoproject.org/#/builders/17/builds/18/steps/11/logs/stdio

Sstate summary: Wanted 19990 Local 17552 Mirrors 0 Missed 2438 Current 0 (87% match, 0% complete)

There is a lot of sstate matching but there were also rebuilds of base-files, connman, bluez, linux-yocto and more which was unexpected.

Theories:
    * the revision changed, changing base-files and things have a dependency on base-files, maybe useradd related which ripple causing more rebuilds than they should

    * somehow DATE/TIME may also come into play

We should invesitgate the dependencies and fix them so we can see better sstate reuse.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99078</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-05-24 14:39:43 +0000</bug_when>
    <thetext>I suspect I&apos;ve seen this before but not reliably. My hunch was the DISTRO_VERSION gets into the dependency tree somewhow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99079</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-05-24 14:49:35 +0000</bug_when>
    <thetext>https://valkyrie.yoctoproject.org/#/builders/17/builds/19/steps/12/logs/stdio

was a following build without changing anything. sstate reuse is better but some things were still rebuilding (why?)

I then changed the master-next revision and started:

https://valkyrie.yoctoproject.org/#/builders/17/builds/20</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99080</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-05-24 14:55:30 +0000</bug_when>
    <thetext>Changing the master-next revision dropped things back to:

Sstate summary: Wanted 19990 Local 17552 Mirrors 0 Missed 2438 Current 0 (87% match, 0% complete)

when the repeat build was 98%</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99081</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-05-24 15:20:01 +0000</bug_when>
    <thetext>This is probably systemd depending on os-release. I&apos;m testing a tweak for that but there may be further issues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99083</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-05-24 15:39:02 +0000</bug_when>
    <thetext>I did a build of systemd.  Touched and committed a file in poky, and built systemd:

NOTE: recipe base-files-3.0.14-r0: task do_install: Started
NOTE: recipe os-release-1.0-r0: task do_compile: Started
NOTE: recipe os-release-1.0-r0: task do_install: Started
NOTE: recipe base-files-3.0.14-r0: task do_populate_sysroot: Started
NOTE: recipe base-files-3.0.14-r0: task do_package: Started
NOTE: recipe os-release-1.0-r0: task do_package: Started
NOTE: recipe os-release-1.0-r0: task do_packagedata: Started
NOTE: recipe base-files-3.0.14-r0: task do_packagedata: Started
NOTE: recipe os-release-1.0-r0: task do_create_spdx: Started
NOTE: recipe os-release-1.0-r0: task do_package_write_ipk: Started
NOTE: recipe systemd-1_255.4-r0: task do_package_write_ipk_setscene: Started
NOTE: recipe systemd-1_255.4-r0: task do_package_qa_setscene: Started
NOTE: recipe systemd-1_255.4-r0: task do_create_runtime_spdx: Started

So nobody _really_ notices because systemd only repackages, but this is definitely a path where SHAs changing causes rebuilds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99097</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-05-30 07:54:27 +0000</bug_when>
    <thetext>(In reply to Ross Burton from comment #5)
&gt; I did a build of systemd.  Touched and committed a file in poky, and built
&gt; systemd:
&gt; 
&gt; NOTE: recipe base-files-3.0.14-r0: task do_install: Started
&gt; NOTE: recipe os-release-1.0-r0: task do_compile: Started
&gt; NOTE: recipe os-release-1.0-r0: task do_install: Started
&gt; NOTE: recipe base-files-3.0.14-r0: task do_populate_sysroot: Started
&gt; NOTE: recipe base-files-3.0.14-r0: task do_package: Started
&gt; NOTE: recipe os-release-1.0-r0: task do_package: Started
&gt; NOTE: recipe os-release-1.0-r0: task do_packagedata: Started
&gt; NOTE: recipe base-files-3.0.14-r0: task do_packagedata: Started
&gt; NOTE: recipe os-release-1.0-r0: task do_create_spdx: Started
&gt; NOTE: recipe os-release-1.0-r0: task do_package_write_ipk: Started
&gt; NOTE: recipe systemd-1_255.4-r0: task do_package_write_ipk_setscene: Started
&gt; NOTE: recipe systemd-1_255.4-r0: task do_package_qa_setscene: Started
&gt; NOTE: recipe systemd-1_255.4-r0: task do_create_runtime_spdx: Started
&gt; 
&gt; So nobody _really_ notices because systemd only repackages, but this is
&gt; definitely a path where SHAs changing causes rebuilds.

Debian renaming dependencies will mean anything with a runtime dependency on systemd would also repackage so this does cause a lot of rebuilding of packages so it is best fixed!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99100</commentid>
    <comment_count>7</comment_count>
    <who name="Trevor Gamblin">tgamblin</who>
    <bug_when>2024-05-30 14:34:58 +0000</bug_when>
    <thetext>Fixed here: https://git.yoctoproject.org/poky/commit/?id=7ec8dcfcef5b169c66c81d018551c96d9730e1aa</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>