[1/5] rootfs: Do not recursively deploy every dependent package

Message ID 20251001105929.3731537-2-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
Using recrdeptask has the side effect that every package in the
dependency will be built and deployed, even though for some packages
just a subset of tasks was needed to fulfil the inter-task dependencies.

For coupled packages like the native/compat ones, which can share part of
their tasks, see 2ca3a7e  dpkg-source: Build source package only once,
this leads to a full build of the base package, while e.g. only the native
part needed to be produced.

Refrain from doing so by going back to using deptask which only adds the deploy
task of the direct dependencies and rely on correct cache and inter-task
settings of the used classes/recipes.
Add rdeptask handling to allow for runtime dependency settings.

This is a partial revert of 7c7628e  rootfs: recursively depend on packages.

This fixes build failures with custom packages which dont support crosscompiling
(-native only), improves performance as no unneeded compiling is being done,
and avoids ambiguity when both packages produce the same artifact (deb-file).

Signed-off-by: Andreas Naumann <anaumann@emlix.com>
---
 meta/classes/rootfs.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 11e6367e..53e60a81 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -347,7 +347,8 @@  do_rootfs_install[root_cleandirs] = "${ROOTFSDIR}"
 do_rootfs_install[vardeps] += "${ROOTFS_CONFIGURE_COMMAND} ${ROOTFS_INSTALL_COMMAND}"
 do_rootfs_install[vardepsexclude] += "IMAGE_ROOTFS"
 do_rootfs_install[depends] = "bootstrap-${@'target' if d.getVar('ROOTFS_ARCH') == d.getVar('DISTRO_ARCH') else 'host'}:do_build"
-do_rootfs_install[recrdeptask] = "do_deploy_deb"
+do_rootfs_install[deptask] = "do_deploy_deb"
+do_rootfs_install[rdeptask] = "do_deploy_deb"
 do_rootfs_install[network] = "${TASK_USE_SUDO}"
 python do_rootfs_install() {
     configure_cmds = (d.getVar("ROOTFS_CONFIGURE_COMMAND") or "").split()