[PATCH 1/5] sstate: Drop unneeded SSTATE_MANMACH variable

Richard Purdie
2026-03-14T09:48:14Z

This variable doesn't appear needed and just confuses the code, remove it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes-global/sstate.bbclass | 13 +++++--------
meta/classes/toaster.bbclass | 8 ++++----
meta/lib/oe/sstatesig.py | 2 +-
3 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass
index 3b2e307134e..fec4d88c4cf 100644
--- a/meta/classes-global/sstate.bbclass
+++ b/meta/classes-global/sstate.bbclass
@@ -9,7 +9,7 @@ SSTATE_VERSION = "14"
SSTATE_ZSTD_CLEVEL ??= "8"

SSTATE_MANIFESTS ?= "${TMPDIR}/sstate-control"
-SSTATE_MANFILEPREFIX = "${SSTATE_MANIFESTS}/manifest-${SSTATE_MANMACH}-${PN}"
+SSTATE_MANFILEPREFIX = "${SSTATE_MANIFESTS}/manifest-${SSTATE_PKGARCH}-${PN}"

def generate_sstatefn(spec, hash, taskname, siginfo, d):
if taskname is None:
@@ -96,8 +96,6 @@ SSTATE_ARCHS = " \
${MACHINE_ARCH}"
SSTATE_ARCHS[vardepsexclude] = "ORIGNATIVELSBSTRING"

-SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
-
SSTATECREATEFUNCS += "sstate_hardcode_path"
SSTATECREATEFUNCS[vardeps] = "SSTATE_SCAN_FILES"
SSTATEPOSTCREATEFUNCS = ""
@@ -148,8 +146,7 @@ python () {
d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${PACKAGE_ARCH}"))
elif bb.data.inherits_class('allarch', d) and d.getVar("PACKAGE_ARCH") == "all":
d.setVar('SSTATE_PKGARCH', "allarch")
- else:
- d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))
+ # Fall back to the default of SSTATE_PKGARCH=PACKAGE_ARCH

if bb.data.inherits_class('native', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross', d):
d.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/")
@@ -320,7 +317,7 @@ def sstate_install(ss, d):

# Append to the list of manifests for this PACKAGE_ARCH

- i = d2.expand("${SSTATE_MANIFESTS}/index-${SSTATE_MANMACH}")
+ i = d2.expand("${SSTATE_MANIFESTS}/index-${SSTATE_PKGARCH}")
l = bb.utils.lockfile(i + ".lock")
filedata = d.getVar("STAMP") + " " + d2.getVar("SSTATE_MANFILEPREFIX") + " " + d.getVar("WORKDIR") + "\n"
manifests = []
@@ -353,7 +350,7 @@ def sstate_install(ss, d):
for lock in locks:
bb.utils.unlockfile(lock)

-sstate_install[vardepsexclude] += "SSTATE_ALLOW_OVERLAP_FILES SSTATE_MANMACH SSTATE_MANFILEPREFIX STAMP"
+sstate_install[vardepsexclude] += "SSTATE_ALLOW_OVERLAP_FILES SSTATE_PKGARCH SSTATE_MANFILEPREFIX STAMP"

def sstate_installpkg(ss, d):
from oe.gpg_sign import get_signer
@@ -520,7 +517,7 @@ def sstate_clean(ss, d):
stamp_clean = d.getVar("STAMPCLEAN")
extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info')
if extrainf:
- d2.setVar("SSTATE_MANMACH", extrainf)
+ d2.setVar("SSTATE_PKGARCH", extrainf)
wildcard_stfile = "%s.do_%s*.%s" % (stamp_clean, ss['task'], extrainf)
else:
wildcard_stfile = "%s.do_%s*" % (stamp_clean, ss['task'])
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index af7c4578088..10c728885ae 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -343,15 +343,15 @@ python toaster_artifacts() {
d2 = d.createCopy()
d2.setVar('FILE', e.taskfile)
# Use 'stamp-extra-info' if present, else use workaround
- # to determine 'SSTATE_MANMACH'
+ # to determine 'SSTATE_PKGARCH'
extrainf = d2.getVarFlag(e.taskname, 'stamp-extra-info')
if extrainf:
- d2.setVar('SSTATE_MANMACH', extrainf)
+ d2.setVar('SSTATE_PKGARCH', extrainf)
else:
if "do_populate_sdk" == e.taskname:
- d2.setVar('SSTATE_MANMACH', d2.expand("${MACHINE}${SDKMACHINE}"))
+ d2.setVar('SSTATE_PKGARCH', d2.expand("${MACHINE}${SDKMACHINE}"))
else:
- d2.setVar('SSTATE_MANMACH', d2.expand("${MACHINE}"))
+ d2.setVar('SSTATE_PKGARCH', d2.expand("${MACHINE}"))
manifest = oe.sstatesig.sstate_get_manifest_filename(e.taskname[3:], d2)[0]

if os.access(manifest, os.R_OK):
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index ef687f5d417..1e07c71e944 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -491,7 +491,7 @@ def sstate_get_manifest_filename(task, d):
d2 = d.createCopy()
extrainf = d.getVarFlag("do_" + task, 'stamp-extra-info')
if extrainf:
- d2.setVar("SSTATE_MANMACH", extrainf)
+ d2.setVar("SSTATE_PKGARCH", extrainf)
return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2)

@bb.parse.vardepsexclude("BBEXTENDCURR", "BBEXTENDVARIANT", "OVERRIDES", "PACKAGE_EXTRA_ARCHS")