[2/3] fix: redirect archall dependency to native provider on non cross builds

Message ID 20260730111106.1223399-3-felix.moessbauer@siemens.com
State New
Headers show
Series Fixes for complex multiarch dependency propagation | expand

Commit Message

MOESSBAUER, Felix July 30, 2026, 11:11 a.m. UTC
The extend_provides needs to mirror the -archall pattern from fixup_depends:
when a provide ends in -archall, the arch-independent (native-equivalent)
provider must be exposed under its bare name, not <name>-archall-native.

We change it so that for the native case it strips -archall and emits
the bare name

Fixes: 327fb313 ("sbuild: do not build arch all packages on cross")
---
 meta/classes-recipe/multiarch.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/classes-recipe/multiarch.bbclass b/meta/classes-recipe/multiarch.bbclass
index 5f84fac2..a30d530c 100644
--- a/meta/classes-recipe/multiarch.bbclass
+++ b/meta/classes-recipe/multiarch.bbclass
@@ -16,7 +16,11 @@  python() {
         if not pn_multiarch_target(pn):
             all_provides = (d.getVar('PROVIDES') or '').split()
             for p in all_provides:
-                if not pn_multiarch_target(p):
+                if p.endswith('-archall'):
+                    # arch=all provider: expose bare name for the native-equivalent
+                    if provides == 'native':
+                        d.appendVar('PROVIDES', ' ' + p[:-len('-archall')])
+                elif not pn_multiarch_target(p):
                     d.appendVar('PROVIDES', f' {p}-{provides}')
             d.appendVar('PROVIDES', f' {pn}-{provides}')