diff mbox series

dev-manual: clarify use of "PACKAGE_ARCH" in a packagegroup

Message ID 967c7da4-403e-0417-78ac-e416c44af1ef@crashcourse.ca
State New
Headers show
Series dev-manual: clarify use of "PACKAGE_ARCH" in a packagegroup | expand

Commit Message

Robert P. J. Day June 10, 2026, 7:53 p.m. UTC
Warn the developer that if they want to set "PACKAGE_ARCH" in a
packagegroup file, that setting must precede the "inherit
packagegroup" line in the packagegroup recipe file.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---
diff mbox series

Patch

diff --git a/documentation/dev-manual/building.rst b/documentation/dev-manual/building.rst
index 9983c7939..d4f1544bb 100644
--- a/documentation/dev-manual/building.rst
+++ b/documentation/dev-manual/building.rst
@@ -615,6 +615,18 @@  your tunings to best consider build times and package feed maintenance.

       PACKAGE_ARCH = "${TUNE_PKGARCH}"

+   .. note::
+
+      If you're defining a packagegroup and you want 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.
+
 -  *Choose a Generic Tuning File if Possible:* Some tunes are more
    generic and can run on multiple targets (e.g. an ``armv5`` set of
    packages could run on ``armv6`` and ``armv7`` processors in most