[2/5] multiarch: handle DPKG_ARCH=all case for transitive deps

Message ID 20251001105929.3731537-3-anaumann@emlix.com
State RFC
Headers show
Series Improving multiarch support for arch-incompatible packages | expand

Commit Message

Andreas Naumann Oct. 1, 2025, 10:59 a.m. UTC
From: Felix Moessbauer' via isar-users <isar-users@googlegroups.com>

Arch=all packages might build depend on other arch=all packages, hence we
need to correctly model the dependency chain. Otherwise the transitive
dependencies are built for the distro arch instead of the native arch.

Co-developed-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
Co-developed-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Signed-off-by: Andreas Naumann <anaumann@emlix.com>
---
 meta/classes/multiarch.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
index babdfbd4..ae465aec 100644
--- a/meta/classes/multiarch.bbclass
+++ b/meta/classes/multiarch.bbclass
@@ -29,7 +29,9 @@  python() {
             d.appendVar('BBCLASSEXTEND', ' compat')
 
     # build native separately only when it differs from the target variant
-    if not archIsAll and archDiffers:
+    # We must not short-circuit for DPKG_ARCH=all packages, as they might
+    # have transitive dependencies which need to be built for -native.
+    if archDiffers:
         d.appendVar('BBCLASSEXTEND', ' native')
     else:
         extend_provides(pn, 'native', d)