[PATCH] installer-add-rootfs: wait for full target image build via do_build

26 views
Skip to first unread message

Gourav Singh

unread,
Apr 21, 2026, 6:06:31 AM (8 days ago) Apr 21
to isar-...@googlegroups.com, Gourav Singh
Previously, the installer depended only on do_image_<type>, which was
derived from IMAGE_DATA_POSTFIX (e.g. do_image_wic for wic.zst). This
created a hidden ordering assumption that the image type being installed
was also the last artifact to be built.

This assumption breaks silently when target images include additional
build steps that run after the wic image, such as swupdate (.swu)
generation. In that case, the installer would start before all artifacts
were ready, missing files like the .swu image entirely.

Replace the derived do_image_<type> dependency with do_build, which is
the natural synchronization point signaling that a recipe is fully done.
This guarantees the installer only starts after all target image
artifacts are produced, regardless of which features are enabled.

As a result, the get_image_type() helper function is no longer needed
and is removed.

Signed-off-by: Gourav Singh <goura...@siemens.com>
---
meta-isar/classes-recipe/installer-add-rootfs.bbclass | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta-isar/classes-recipe/installer-add-rootfs.bbclass b/meta-isar/classes-recipe/installer-add-rootfs.bbclass
index e3777d62..a0bfc893 100644
--- a/meta-isar/classes-recipe/installer-add-rootfs.bbclass
+++ b/meta-isar/classes-recipe/installer-add-rootfs.bbclass
@@ -57,10 +57,6 @@ def get_mc_depends(d, task):
deps.append(f"mc:{installer_mc}:{installer_target_mc}:{image}:{task}")
return " ".join(deps)

-def get_image_type(suffix):
- image_type = suffix.split(".")[0]
- return f"{image_type}"
-
python() {
entries = []

@@ -81,5 +77,5 @@ python() {
d.setVar("ROOTFS_ADDITIONAL_FILES", " ".join(entries))
}

-INSTALLER_TARGET_TASK ??="do_image_${@ get_image_type(d.getVar('IMAGE_DATA_POSTFIX'))}"
+INSTALLER_TARGET_TASK ??="do_build"
do_rootfs_install[mcdepends] += "${@ get_mc_depends(d, d.getVar('INSTALLER_TARGET_TASK'))}"
--
2.39.5

MOESSBAUER, Felix

unread,
Apr 21, 2026, 8:06:28 AM (8 days ago) Apr 21
to Singh, Gourav, isar-...@googlegroups.com
On Tue, 2026-04-21 at 15:35 +0530, 'Gourav Singh' via isar-users wrote:
> Previously, the installer depended only on do_image_<type>, which was
> derived from IMAGE_DATA_POSTFIX (e.g. do_image_wic for wic.zst). This
> created a hidden ordering assumption that the image type being installed
> was also the last artifact to be built.
>
> This assumption breaks silently when target images include additional
> build steps that run after the wic image, such as swupdate (.swu)
> generation. In that case, the installer would start before all artifacts
> were ready, missing files like the .swu image entirely.
>
> Replace the derived do_image_<type> dependency with do_build, which is
> the natural synchronization point signaling that a recipe is fully done.
> This guarantees the installer only starts after all target image
> artifacts are produced, regardless of which features are enabled.
>
> As a result, the get_image_type() helper function is no longer needed
> and is removed.

Hi,

good catch! Please also add a fixes tag.

And that's also a candidate for the v1.0.1 (or v1.1) release.

Felix

>
> Signed-off-by: Gourav Singh <goura...@siemens.com>
> ---
> meta-isar/classes-recipe/installer-add-rootfs.bbclass | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/meta-isar/classes-recipe/installer-add-rootfs.bbclass b/meta-isar/classes-recipe/installer-add-rootfs.bbclass
> index e3777d62..a0bfc893 100644
> --- a/meta-isar/classes-recipe/installer-add-rootfs.bbclass
> +++ b/meta-isar/classes-recipe/installer-add-rootfs.bbclass
> @@ -57,10 +57,6 @@ def get_mc_depends(d, task):
> deps.append(f"mc:{installer_mc}:{installer_target_mc}:{image}:{task}")
> return " ".join(deps)
>
> -def get_image_type(suffix):
> - image_type = suffix.split(".")[0]
> - return f"{image_type}"
> -
> python() {
> entries = []
>
> @@ -81,5 +77,5 @@ python() {
> d.setVar("ROOTFS_ADDITIONAL_FILES", " ".join(entries))
> }
>
> -INSTALLER_TARGET_TASK ??="do_image_${@ get_image_type(d.getVar('IMAGE_DATA_POSTFIX'))}"
> +INSTALLER_TARGET_TASK ??="do_build"
> do_rootfs_install[mcdepends] += "${@ get_mc_depends(d, d.getVar('INSTALLER_TARGET_TASK'))}"
> --
> 2.39.5
>

> --
> 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+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260421100525.4066102-1-gouravsingh%40siemens.com.

Gourav Singh

unread,
Apr 21, 2026, 1:22:17 PM (8 days ago) Apr 21
to isar-...@googlegroups.com, Gourav Singh
Previously, the installer depended only on do_image_<type>, which was
derived from IMAGE_DATA_POSTFIX (e.g. do_image_wic for wic.zst). This
created a hidden ordering assumption that the image type being installed
was also the last artifact to be built.

This assumption breaks silently when target images include additional
build steps that run after the wic image, such as swupdate (.swu)
generation. In that case, the installer would start before all artifacts
were ready, missing files like the .swu image entirely.

Replace the derived do_image_<type> dependency with do_build, which is
the natural synchronization point signaling that a recipe is fully done.
This guarantees the installer only starts after all target image
artifacts are produced, regardless of which features are enabled.

As a result, the get_image_type() helper function is no longer needed
and is removed.

Fixes: a7364ea ("installer-add-rootfs: build target image for image data postfix")

Signed-off-by: Gourav Singh <goura...@siemens.com>
---
meta-isar/classes-recipe/installer-add-rootfs.bbclass | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta-isar/classes-recipe/installer-add-rootfs.bbclass b/meta-isar/classes-recipe/installer-add-rootfs.bbclass
index 69d87be8..111506df 100644
--- a/meta-isar/classes-recipe/installer-add-rootfs.bbclass
+++ b/meta-isar/classes-recipe/installer-add-rootfs.bbclass
@@ -56,10 +56,6 @@ def get_mc_depends(d, task):
deps.append(f"mc:{installer_mc}:{installer_target_mc}:{image}:{task}")
return " ".join(deps)

-def get_image_type(suffix):
- image_type = suffix.split(".")[0]
- return f"{image_type}"
-
python() {
entries = []

@@ -80,5 +76,5 @@ python() {

Zhihang Wei

unread,
Apr 22, 2026, 6:28:22 AM (7 days ago) Apr 22
to Gourav Singh, isar-...@googlegroups.com
Applied to next, thanks.

Zhihang
Reply all
Reply to author
Forward
0 new messages