[1/2] rootfs: make DEPLOYDIR available to all rootfs

Message ID 20260714133422.1792603-2-felix.moessbauer@siemens.com
State Priority Review
Headers show
Series Fix issue around missing initrd on partial rebuilds | expand

Commit Message

Felix Moessbauer July 14, 2026, 1:34 p.m. UTC
This variable contains a WORKDIR specific deploy dir that shall be used
when deploying via the sstate cache. To be able to use this from all
rootfs tasks, we move this variable to the rootfs class.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes-recipe/image.bbclass     | 1 -
 meta/classes-recipe/initramfs.bbclass | 1 -
 meta/classes-recipe/rootfs.bbclass    | 2 ++
 3 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
index a44c6de4..4194dda4 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -3,7 +3,6 @@ 
 
 # Make workdir and stamps machine-specific without changing common PN target
 WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/${PV}-${PR}"
-DEPLOYDIR = "${WORKDIR}/deploy"
 STAMP = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/${PV}-${PR}"
 STAMPCLEAN = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/*-*"
 
diff --git a/meta/classes-recipe/initramfs.bbclass b/meta/classes-recipe/initramfs.bbclass
index 1b3133d7..e0a5f5ab 100644
--- a/meta/classes-recipe/initramfs.bbclass
+++ b/meta/classes-recipe/initramfs.bbclass
@@ -2,7 +2,6 @@ 
 
 # Make workdir and stamps machine-specific without changing common PN target
 WORKDIR = "${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/${PV}-${PR}"
-DEPLOYDIR = "${WORKDIR}/deploy"
 STAMP = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/${PV}-${PR}"
 STAMPCLEAN = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/*-*"
 
diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
index 312b7904..aaacd1e6 100644
--- a/meta/classes-recipe/rootfs.bbclass
+++ b/meta/classes-recipe/rootfs.bbclass
@@ -8,6 +8,8 @@  inherit sbom
 ROOTFS_ARCH ?= "${DISTRO_ARCH}"
 ROOTFS_DISTRO ?= "${DISTRO}"
 
+DEPLOYDIR = "${WORKDIR}/deploy"
+
 # This variable is intended to be set if dracut is
 # the default initramfs generator and it is not
 # possible to derive the value in another way