mbox series

[v2,0/4] Only build arch=all package from -native variant

Message ID 20260504085048.705717-1-felix.moessbauer@siemens.com
Headers show
Series Only build arch=all package from -native variant | expand

Message

Felix Moessbauer May 4, 2026, 8:50 a.m. UTC
Architecture-all packages often cannot be built in cross mode, as their
dependencies cannot be resolved for the host architecture. Therefore, we
need to dispatch the build of arch=all packages from the target recipe
to the -native variant. This introduces some side effects:

- A mixed arch=(all|any) package needs to be built twice: once in
  cross mode for the arch=any parts, and once in -native mode for the
  arch=all parts (p2).
- Dependencies on arch=all packages from mixed source packages need to
  be modeled so that consumers of a package do not need to be aware of
  this distinction (p2).
- The arch=all packages must be available in the apt repository used
  during target installation (p3).

Since we now ensure that arch=all packages are only built once, we can
safely revert the repo-split patch. Moreover, we must do so to make the
arch=all packages available during target installation.

PS: As our multiarch code history contains numerous fix tags,
I kindly ask everyone to test this series carefully.

Changes since v1:

- model dependencies to arch=all packages via DEPENDS / PROVIDES instead
  of an explicit dependency to -native.
- add revert of repo-split patch
- add testcase

Best regards,
Felix Moessbauer

Felix Moessbauer (4):
  mark cowsay package as architecture all
  sbuild: do not build arch all packages on cross
  Revert "Split up isar-apt into distro-arch specific instances"
  add test for mixed arch all arch any packages

 RECIPE-API-CHANGELOG.md                          | 16 ++++++++++++++++
 meta-isar/recipes-app/cowsay/cowsay_git.bb       |  2 ++
 meta-test/recipes-app/test-all-any/files/control | 16 ++++++++++++++++
 .../recipes-app/test-all-any/test-all-any.bb     | 13 +++++++++++++
 meta/classes-recipe/dpkg.bbclass                 |  3 ++-
 meta/classes-recipe/multiarch.bbclass            |  4 ++++
 meta/conf/bitbake.conf                           |  4 ++--
 testsuite/citest.py                              |  3 ++-
 8 files changed, 57 insertions(+), 4 deletions(-)
 create mode 100644 meta-test/recipes-app/test-all-any/files/control
 create mode 100644 meta-test/recipes-app/test-all-any/test-all-any.bb