[v2] installer: only include wic.bmap for IMAGE_DATA_POSTFIX wic*

Message ID 20260729104526.4071393-1-clara.kowalsky@siemens.com
State New
Headers show
Series [v2] installer: only include wic.bmap for IMAGE_DATA_POSTFIX wic* | expand

Commit Message

Clara Kowalsky July 29, 2026, 10:45 a.m. UTC
If a target image type other than wic* is added to the installer's
rootfs, there is no corresponding wic.bmap file. Add the wic.bmap to the
rootfs only if the IMAGE_DATA_POSTFIX begins with wic (wic.zst,
wic.xz etc. included).

Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com>
---
 meta-isar/classes-recipe/installer-add-rootfs.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/meta-isar/classes-recipe/installer-add-rootfs.bbclass b/meta-isar/classes-recipe/installer-add-rootfs.bbclass
index 111506df..c4921bc6 100644
--- a/meta-isar/classes-recipe/installer-add-rootfs.bbclass
+++ b/meta-isar/classes-recipe/installer-add-rootfs.bbclass
@@ -58,6 +58,7 @@  def get_mc_depends(d, task):
 
 python() {
     entries = []
+    image_data_postfix = d.getVar("IMAGE_DATA_POSTFIX") or ""
 
     def add_entries(postfix, suffix):
         sources = get_installer_sources(d, suffix)
@@ -70,8 +71,9 @@  python() {
             d.setVarFlag(var, "source", src)
             d.setVarFlag(var, "destination", dst)
 
-    add_entries("", d.getVar("IMAGE_DATA_POSTFIX"))
-    add_entries("-bmap", "wic.bmap")
+    add_entries("", image_data_postfix)
+    if image_data_postfix.startswith("wic"):
+        add_entries("-bmap", "wic.bmap")
 
     d.setVar("ROOTFS_ADDITIONAL_FILES", " ".join(entries))
 }