From: "'Andreas Naumann' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Andreas Naumann <anaumann@emlix.com>
Subject: [PATCH v2 3/3] multiarch: Replace divertion of deploy task for "all" packages
Date: Tue, 18 Nov 2025 15:35:23 +0100 [thread overview]
Message-ID: <20251118143523.2326879-4-anaumann@emlix.com> (raw)
In-Reply-To: <20251118143523.2326879-1-anaumann@emlix.com>
Diverting the do_deploy_deb function of the base package to the native variant
had the sideeffect that the dependencies of the native variant were added to
the dependency chain even if the package was originally depended on in its non-
native form.
Fix this by not manipulating the dependencies at all, but just build the base
package for the host architecture. That way sub-dependencies are preserved for
all uses cases.
Fixes: 5a7c2f7004 ("handle DPKG_ARCH=all case for transitive deps")
Signed-off-by: Andreas Naumann <anaumann@emlix.com>
---
meta/classes/multiarch.bbclass | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass
index 74b8f5b8..851d1aa1 100644
--- a/meta/classes/multiarch.bbclass
+++ b/meta/classes/multiarch.bbclass
@@ -31,8 +31,6 @@ python() {
# build native separately only when it differs from the target variant
# We must not short-circuit for DPKG_ARCH=all packages, as they might
# have transitive dependencies which need to be built for -native.
- # This special handling for DPKG_ARCH=all packages is left to the
- # multiarch_virtclass_handler
if archDiffers:
d.appendVar('BBCLASSEXTEND', ' native')
else:
@@ -103,17 +101,8 @@ python multiarch_virtclass_handler() {
fixup_pn_in_vars(e.data)
fixup_depends('-native', e.data)
elif archIsAll and archDiffers:
- # Arch=all packages might build depend on other arch=all packages,
- # hence we need to correctly model the dependency chain.
- # We implement this by dispatching the non-native variant to the -native
- # variant by adding a dependency. We further empty the non-native
- # do_deploy_dep task and clear the internal dependency chain, but keep
- # other attached variables like RDEPENDS to preserve the dependency chain.
- e.data.setVar('do_deploy_deb', '')
- # clear internal dependencies (e.g. to do_dpkg_build)
- e.data.setVarFlag('do_deploy_deb', 'deps', [])
- # dispatch to native variant
- e.data.setVarFlag('do_deploy_deb', 'depends', f'{pn}-native:do_deploy_deb')
+ # Speed up Arch=all package build
+ e.data.setVar('PACKAGE_ARCH', d.getVar('HOST_ARCH'))
}
addhandler multiarch_virtclass_handler
multiarch_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
--
2.43.0
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20251118143523.2326879-4-anaumann%40emlix.com.
next prev parent reply other threads:[~2025-11-18 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 14:35 [PATCH v2 0/3] test and fix transitive multiarch dependencies 'Andreas Naumann' via isar-users
2025-11-18 14:35 ` [PATCH v2 1/3] test: Add test to check correct multiarch dependency propagation 'Andreas Naumann' via isar-users
2025-11-18 14:35 ` [PATCH v2 2/3] rootfs: Do not recursively build unneeded packages 'Andreas Naumann' via isar-users
2025-11-18 14:35 ` 'Andreas Naumann' via isar-users [this message]
2025-11-27 8:34 ` [PATCH v2 0/3] test and fix transitive multiarch dependencies Zhihang Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251118143523.2326879-4-anaumann@emlix.com \
--to=isar-users@googlegroups.com \
--cc=anaumann@emlix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox