<?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>14715</bug_id>
          
          <creation_ts>2022-02-08 13:55:49 +0000</creation_ts>
          <short_desc>Outdated sstate used after updated kernel</short_desc>
          <delta_ts>2022-02-10 15:42:39 +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>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Johannes Schrimpf">johannes.schrimpf</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>92489</commentid>
    <comment_count>0</comment_count>
    <who name="Johannes Schrimpf">johannes.schrimpf</who>
    <bug_when>2022-02-08 13:55:49 +0000</bug_when>
    <thetext>Hi, presumingly after a kernel update, my build fails with:

```
calculate_dependencies_for: Cannot satisfy the following dependencies for packagegroup-be-video:
 * 	kernel-5.10.74+g7ae74dbbe24f * 
```

The strange thing is that the correct kernel version in the same build is `kernel-5.10.74+gaf5aa53b55c8`

It seems the wrong version comes in through the sstate cache. I verified that it happens with a clean tmp directory.

Somehow, bitbake does not seem to understand that the cached package (including a kernel module) was built against another kernel version hash, uses the old sstate and thereby adds a dependency that cannot be resolved.

Regarding my setup, `packagegroup-be-video` includes a package that depends on `kernel-module-imx-gpu-viv` from meta-freescale.

However, when searching my `tmp/work` folder, I find more packages including the wrong hash, f. ex. `perf`, also imported from the sstate cache. The modules built from the kernel recipe directly all seem to have the correct version in the `tmp/work` folder.

I use honister, the latest versions from git.

```
meta                 
meta-poky            
meta-yocto-bsp       = &quot;heads/honister:4d7162798ec19c726877e85509e4c7a99eb6576d&quot;
...[own layers]...
meta-freescale       = &quot;heads/honister:724def083c543489d151b72568d1cbb31d884ee5&quot;
meta-freescale-3rdparty = &quot;heads/honister:155ffd6d7b694d8de76919c25681ecb98882646e&quot;
meta-freescale-distro = &quot;heads/honister:d2e27cc4778663450495a67bfb036cba600cb27a&quot;
meta-swupdate        = &quot;heads/honister:8f5437673629f2d86e2ce7030f753201caae6447&quot;
meta-oe              
meta-filesystems     
meta-multimedia      
meta-networking      
meta-python          
meta-webserver       = &quot;heads/honister:c05ae80ba680887ac924c21536091be7a1173427&quot;
meta-ros-common      
meta-ros1            
meta-ros1-noetic     = &quot;heads/honister:53d3b8f59b1c5d2fbb605db0fe37af996ea63d3b&quot;
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92490</commentid>
    <comment_count>1</comment_count>
    <who name="Johannes Schrimpf">johannes.schrimpf</who>
    <bug_when>2022-02-08 14:20:33 +0000</bug_when>
    <thetext>After cleaning the sstate cache for those packages and the related folders in `tmp/work` that had references to the wrong version number, I get the same error with a new version string:

```
calculate_dependencies_for: Cannot satisfy the following dependencies for packagegroup-be-video:
 * 	kernel-5.10.74+geac40b789261 * 
```

The correct kernel version in the image is still kernel-5.10.74+gaf5aa53b55c8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92491</commentid>
    <comment_count>2</comment_count>
    <who name="Johannes Schrimpf">johannes.schrimpf</who>
    <bug_when>2022-02-08 16:16:39 +0000</bug_when>
    <thetext>I manages a successful build by:
- Cleaning the sstate of all kernel-related packages and modules
- Deleting the tmp directory (likely enough to delete all folders for relevant packages in the work folder)


Then I manages to reproduce the bug afterwards by:
- Cleaning the sstate cache for kernel-module-imx-gpu-viv
- Deleting the tmp directory
- Building the image

In this setup, kernel-module-imx-gpu-viv gets the wrong version string.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92499</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-02-10 10:58:07 +0000</bug_when>
    <thetext>Unfortunately you&apos;re using the freescale layers which do all kinds of weird things with the kernel. We&apos;ve not seen this with the core yocto project and I suspect this is some issue in those kernel/module recipes. If you can reproduce this without the freescale layers we can look into the issue but right now I think you need to talk to the freescale maintainers about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92518</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-02-10 15:42:39 +0000</bug_when>
    <thetext>Please check with freescale. No on using just oe-core has seen this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>