From 267e62dae3412439f98ad07cc526db4700f00218 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Tue, 16 Jun 2026 12:46:51 -0400 Subject: [PATCH] ref-manual: clarify use of "PACKAGE_ARCH" in a packagegroup Warn the developer that if they need to set "PACKAGE_ARCH" in a custom packagegroup file, that setting must precede the "inherit packagegroup" line in the packagegroup recipe file. (From yocto-docs rev: 9d84e1ccddb2cf17641447721cd2b0b524ef872f) Signed-off-by: Robert P. J. Day Signed-off-by: Antonin Godard (cherry picked from commit 98a14fe885370d52a6f46e940834c725bad6933d) Signed-off-by: Antonin Godard Signed-off-by: Paul Barker --- documentation/ref-manual/classes.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index 0b034eb475..cbb119bd7b 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst @@ -2404,6 +2404,18 @@ section in the Yocto Project Development Tasks Manual. Previously, this class was called the ``task`` class. +.. note:: + + If you're defining a packagegroup and need to set:: + + PACKAGE_ARCH = "${MACHINE_ARCH}" + + for the packagegroup, you need to do that *before* the + ``inherit packagegroup`` line in the recipe file. + Setting it afterward can break BitBake parsing, result in + an "allarch" architecture mismatch error, or allow + architecture-independent defaults to override your intent. + .. _ref-classes-patch: ``patch``