public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Zhihang Wei <wzh@ilbers.de>
To: Felix Moessbauer <felix.moessbauer@siemens.com>,
	isar-users@googlegroups.com
Cc: adriaan.schmidt@siemens.com
Subject: Re: [PATCH 1/1] native: fix unexpanded SSTATE_PKGARCH for -native variants
Date: Tue, 6 Oct 2026 12:25:42 +0200	[thread overview]
Message-ID: <6c6bfd43-5967-44eb-8ef2-e42618abd244@ilbers.de> (raw)
In-Reply-To: <20260925071744.1727072-1-felix.moessbauer@siemens.com>

Applied to next, thanks.

Zhihang

On 9/25/26 09:17, 'Felix Moessbauer' via isar-users wrote:
> 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}"

-- 
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/6c6bfd43-5967-44eb-8ef2-e42618abd244%40ilbers.de.

      reply	other threads:[~2026-10-06 10:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25  7:17 'Felix Moessbauer' via isar-users
2026-10-06 10:25 ` Zhihang Wei [this message]

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=6c6bfd43-5967-44eb-8ef2-e42618abd244@ilbers.de \
    --to=wzh@ilbers.de \
    --cc=adriaan.schmidt@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.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