[PATCHv3,2/3] sstate: fix task order and deps

Message ID 20220204164124.10396-3-henning.schild@siemens.com
State Accepted, archived
Headers show
Series sstate bug fix | expand

Commit Message

Henning Schild Feb. 4, 2022, 6:41 a.m. UTC
With do_rootfs_install being the new sstate task we need to be more
precise on what needs to happen before do_rootfs_postprocess.

Some postprocess functions need files downloaded so we add "after unpack"
 - sdkchroot_install_files
 - buildchroot_install_files
And do_rootfs_postprocess needs the apt caches for rootfs_do_mounts.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/rootfs.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 78fb2cc71350..9f0d345dae03 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -262,7 +262,7 @@  python do_rootfs_postprocess() {
         bb.build.exec_func(cmd, d)
         progress_reporter.update(int(i / len(cmds) * 100))
 }
-addtask rootfs_postprocess before do_rootfs
+addtask rootfs_postprocess before do_rootfs after do_unpack
 
 python do_rootfs() {
     """Virtual task"""
@@ -270,9 +270,10 @@  python do_rootfs() {
 }
 addtask rootfs before do_build
 
+do_rootfs_postprocess[depends] = "base-apt:do_cache isar-apt:do_cache_config"
+
 SSTATETASKS += "do_rootfs_install"
 ROOTFS_SSTATE = "${WORKDIR}/rootfs-sstate"
-do_rootfs_install[depends] += " base-apt:do_cache isar-apt:do_cache_config"
 do_rootfs_install[dirs] += "${ROOTFS_SSTATE} ${WORKDIR}/mnt/rootfs"
 do_rootfs_install[cleandirs] += "${ROOTFS_SSTATE}"
 do_rootfs_install[sstate-plaindirs] = "${ROOTFS_SSTATE}"