Re: [docs] [PATCH] dev-manual: clarify use of "PACKAGE_ARCH" in a packagegroup

"Antonin Godard" <[email protected]>
Newsgroups org.yoctoproject.lists.docs
Message-ID <[email protected]>
Hi,

On Wed Jun 10, 2026 at 9:53 PM CEST, Robert P. J. Day wrote:
>
> 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 <[email protected]>
>
> ---
>
> 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

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

Antonin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.