From: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: adriaan.schmidt@siemens.com,
Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 1/1] native: fix unexpanded SSTATE_PKGARCH for -native variants
Date: Fri, 25 Sep 2026 09:17:44 +0200 [thread overview]
Message-ID: <20260925071744.1727072-1-felix.moessbauer@siemens.com> (raw)
sstate.bbclass (copied verbatim from Yocto) derives SSTATE_PKGARCH from
BUILD_ARCH in its anonymous python function. In Isar, BUILD_ARCH is not
defined at configuration level but only assigned later by the anonymous
function of crossvars.bbclass. As sstate is pulled in via INHERIT, its
anonymous function runs first, so BUILD_ARCH is still unset and
SSTATE_PKGARCH ends up undefined.
BitBake then leaves the literal ${SSTATE_PKGARCH} in SSTATE_PKGSPEC,
which propagates into the sstate artifact file names of all -native
variants:
sstate:example-raw-native:amd64-isar:0.3:r0:${SSTATE_PKGARCH}:12:...
Overriding SSTATE_PKGARCH for class-native does not help: setVar() drops
all currently active overrides of the variable it sets, so the
assignment in sstate.bbclass wipes it again. Define BUILD_ARCH for
class-native instead, which is what crossvars.bbclass computes for that
variant anyway. -compat is not affected, as sstate.bbclass leaves
SSTATE_PKGARCH at its PACKAGE_ARCH default there.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/classes-recipe/native.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes-recipe/native.bbclass b/meta/classes-recipe/native.bbclass
index 7dad3bf9..4efa387a 100644
--- a/meta/classes-recipe/native.bbclass
+++ b/meta/classes-recipe/native.bbclass
@@ -8,3 +8,7 @@
################################################################################
PACKAGE_ARCH:class-native = "${HOST_ARCH}"
+
+# Must match what crossvars.bbclass derives from PACKAGE_ARCH above, as
+# sstate.bbclass already reads BUILD_ARCH before crossvars.bbclass sets it.
+BUILD_ARCH:class-native = "${HOST_ARCH}"
--
2.55.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260925071744.1727072-1-felix.moessbauer%40siemens.com.
next reply other threads:[~2026-09-25 7:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 7:17 'Felix Moessbauer' via isar-users [this message]
2026-10-06 10:25 ` Zhihang Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260925071744.1727072-1-felix.moessbauer@siemens.com \
--to=isar-users@googlegroups.com \
--cc=adriaan.schmidt@siemens.com \
--cc=felix.moessbauer@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox