> isar:git:r0:${SSTATE_PKGARCH}:10:aa07cf2e6ff17f7004e6dc2b4e7a9a6123b1
> 27668c27d4c3cb29d0f7dc65ac5f_deploy_deb.tar.zst.siginfo'
> sstate-cache/isarnative/c4/db/sstate:cowsay-native:amd64-
> isar:git:r0:${SSTATE_PKGARCH}:10:c4dbfbe1c1696f2b690f15cbd179a5795fe4
> 8f05a30a76d20783c98786af6d4a_adjust_git.tar.zst.siginfo'
> sstate-cache/isarnative/d0/0c/sstate:cowsay-native:amd64-
> isar:git:r0:${SSTATE_PKGARCH}:10:d00c69fa102b131bc09fb27aa8259fcb447d
> be5b51d5f6723d1e12ff43f92fee_transform_template.tar.zst.siginfo'
> sstate-cache/isarnative/e7/94/sstate:cowsay-native:amd64-
> isar:git:r0:${SSTATE_PKGARCH}:10:e794e52fe10ccf60b559089c39eaf86a4990
> a81991c9b1b0b2672721878a1b8b_prepare_build.tar.zst.siginfo'
>
> 5. Remove stamps directory.
> 6. Build again - SSTATE should be used for the package but it is not
> and the tasks are run again.
>
> I think it is related to
>
https://github.com/ilbers/isar/blob/61086915e6c83fff22effa85cda64a2ac0c2f100/meta/classes/sstate.bbclass#L136
> and BUILD_ARCH being empty according to 'bitbake -e'.
>
> I changed the line to HOST_ARCH (+expand=True) which seems to work
> but I do not have enough expertise to guess its correctness. Maybe
> the line in native.bbclass covers this "if statement" already?
>
> How to best resolve this?
>
>
Hello, Jan.
I've tried to repeat your steps and reproduced the issue in case of
cross-building.
Changing the line to HOST_ARCH is techincally correct. But since we
don't like forking (sstate.bbclass is taken from some OE branch without
any changes), I think it would be better to just define BUILD_ARCH
somewhere else in Isar to the value of HOST_ARCH, for example:
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 9eb93e2b..0d737b64 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -90,6 +90,7 @@ NATIVELSBSTRING ?= "isarnative"
TARGET_VENDOR = ""
TARGET_OS = "isar"
PACKAGE_ARCH ?= "${DISTRO_ARCH}"
+BUILD_ARCH ?= "${HOST_ARCH}"
# Isar apt repository paths
REPO_ISAR_DIR = "${DEPLOY_DIR}/isar-apt/${DISTRO}-${DISTRO_ARCH}/apt"
This seems to work and doesn't fork sstate.bbclass, so it can be later
updated to some newer OE revision.
Unfortunately, HOST_ARCH has different meanings in Isar and Yocto...