Skip to contentSkip to conversation

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

PATCH In review Robert P. J. Day 2 participants 2 messages Jun 10 – Jun 16

lore
Share & tools
lore
#0 lore raw

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

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.

---

documentation/dev-manual/building.rst +12 -0
index 9983c7939..d4f1544bb 100644
@@ -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
#1 lore raw

Hi,

Quoted 22 lines · Robert P. J. Day

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.

---

documentation/dev-manual/building.rst +5 -0
index 9983c7939..d4f1544bb 100644
@@ -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}"

documentation/dev-manual/building.rst your tunings to best consider build times and package feed maintenance. · line 632

Quoted 10 lines
documentation/dev-manual/building.rst +7 -0
+
+      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

I think this note should be in the packagegroup class documentation, rather than here.

Antonin