diff mbox series

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

Message ID 70a7a488-e6f7-3997-230c-ce8deb26308c@crashcourse.ca
State New
Headers show
Series ref-manual: clarify use of "PACKAGE_ARCH" in a packagegroup | expand

Commit Message

Robert P. J. Day June 16, 2026, 4:46 p.m. UTC
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.

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

---
diff mbox series

Patch

diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index 95e07f85a..839a89d4b 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -2130,6 +2130,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``