diff mbox series

sstate/staging: Add SSTATETASKS vardepsexclude entries

Message ID 20260701170631.4140885-1-richard.purdie@linuxfoundation.org
State New
Headers show
Series sstate/staging: Add SSTATETASKS vardepsexclude entries | expand

Commit Message

Richard Purdie July 1, 2026, 5:06 p.m. UTC
Tasks should never be dependning on SSTATETASKS since that can change for things
which code should be independent from (e.g. package backend), breaking sstate reuse.
Add the appropriate vardepexclude entres.

This currently isn't an issue due to extend_recipe_sysroot being globally
excluded from hashes.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes-global/sstate.bbclass  | 2 ++
 meta/classes-global/staging.bbclass | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass
index 4ad71a70dac..34a59fda002 100644
--- a/meta/classes-global/sstate.bbclass
+++ b/meta/classes-global/sstate.bbclass
@@ -467,6 +467,7 @@  def sstate_clean_cachefiles(d):
         ld = d.createCopy()
         ss = sstate_state_fromvars(ld, task)
         sstate_clean_cachefile(ss, ld)
+sstate_clean_cachefiles[vardepsexclude] += "SSTATETASKS"
 
 def sstate_clean_manifest(manifest, d, canrace=False, prefix=None):
     import oe.path
@@ -571,6 +572,7 @@  python sstate_cleanall() {
         shared_state = sstate_state_fromvars(ld, name)
         sstate_clean(shared_state, ld)
 }
+sstate_cleanall[vardepsexclude] = "SSTATETASKS"
 
 python sstate_hardcode_path () {
     import subprocess, platform
diff --git a/meta/classes-global/staging.bbclass b/meta/classes-global/staging.bbclass
index 15ed3d002f1..7e4267afc7a 100644
--- a/meta/classes-global/staging.bbclass
+++ b/meta/classes-global/staging.bbclass
@@ -645,7 +645,7 @@  python extend_recipe_sysroot() {
 
     bb.utils.unlockfile(lock)
 }
-extend_recipe_sysroot[vardepsexclude] += "BB_TASKDEPDATA"
+extend_recipe_sysroot[vardepsexclude] += "BB_TASKDEPDATA SSTATETASKS"
 
 do_prepare_recipe_sysroot[deptask] = "do_populate_sysroot"
 python do_prepare_recipe_sysroot () {