public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] installer-add-rootfs: build target image for image data postfix
@ 2025-10-16 14:36 'Clara Kowalsky' via isar-users
  2025-10-29  7:53 ` Zhihang Wei
  0 siblings, 1 reply; 2+ messages in thread
From: 'Clara Kowalsky' via isar-users @ 2025-10-16 14:36 UTC (permalink / raw)
  To: isar-users; +Cc: florian.bezdeka, Clara Kowalsky

Even if the image data postfix was set to something other than wic*, the
do_image_wic task was executed for the target image. This fixes this
issue and invokes the correct corresponding task.

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

diff --git a/meta-isar/classes/installer-add-rootfs.bbclass b/meta-isar/classes/installer-add-rootfs.bbclass
index c738f690..6708932c 100644
--- a/meta-isar/classes/installer-add-rootfs.bbclass
+++ b/meta-isar/classes/installer-add-rootfs.bbclass
@@ -44,9 +44,14 @@ def get_mc_depends(d, task):
     installer_target_mc = d.getVar('INSTALLER_TARGET_MC') or ""
     return f"mc:{installer_mc}:{installer_target_mc}:{installer_target_image}:{task}"
 
+def get_image_type(suffix):
+    image_type = suffix.split(".")[0]
+    return f"{image_type}"
+
 ROOTFS_ADDITIONAL_FILE_installer-target[source] = "${@ get_installer_source(d, d.getVar('IMAGE_DATA_POSTFIX'))}"
 ROOTFS_ADDITIONAL_FILE_installer-target[destination] = "${@ get_installer_destination(d, d.getVar('IMAGE_DATA_POSTFIX'))}"
 ROOTFS_ADDITIONAL_FILE_installer-target-bmap[source] = "${@ get_installer_source(d, "wic.bmap")}"
 ROOTFS_ADDITIONAL_FILE_installer-target-bmap[destination] = "${@ get_installer_destination(d, "wic.bmap")}"
 
-do_rootfs_install[mcdepends] += "${@ get_mc_depends(d, "do_image_wic")}"
+INSTALLER_TARGET_TASK ??="do_image_${@ get_image_type(d.getVar('IMAGE_DATA_POSTFIX'))}"
+do_rootfs_install[mcdepends] += "${@ get_mc_depends(d, d.getVar('INSTALLER_TARGET_TASK'))}"
-- 
2.51.0

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] installer-add-rootfs: build target image for image data postfix
  2025-10-16 14:36 [PATCH] installer-add-rootfs: build target image for image data postfix 'Clara Kowalsky' via isar-users
@ 2025-10-29  7:53 ` Zhihang Wei
  0 siblings, 0 replies; 2+ messages in thread
From: Zhihang Wei @ 2025-10-29  7:53 UTC (permalink / raw)
  To: Clara Kowalsky, isar-users; +Cc: florian.bezdeka

Applied to next, thanks.

Best regards,
Zhihang

On 10/16/25 16:36, 'Clara Kowalsky' via isar-users wrote:
> Even if the image data postfix was set to something other than wic*, the
> do_image_wic task was executed for the target image. This fixes this
> issue and invokes the correct corresponding task.
>
> Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com>
> ---
>   meta-isar/classes/installer-add-rootfs.bbclass | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/meta-isar/classes/installer-add-rootfs.bbclass b/meta-isar/classes/installer-add-rootfs.bbclass
> index c738f690..6708932c 100644
> --- a/meta-isar/classes/installer-add-rootfs.bbclass
> +++ b/meta-isar/classes/installer-add-rootfs.bbclass
> @@ -44,9 +44,14 @@ def get_mc_depends(d, task):
>       installer_target_mc = d.getVar('INSTALLER_TARGET_MC') or ""
>       return f"mc:{installer_mc}:{installer_target_mc}:{installer_target_image}:{task}"
>   
> +def get_image_type(suffix):
> +    image_type = suffix.split(".")[0]
> +    return f"{image_type}"
> +
>   ROOTFS_ADDITIONAL_FILE_installer-target[source] = "${@ get_installer_source(d, d.getVar('IMAGE_DATA_POSTFIX'))}"
>   ROOTFS_ADDITIONAL_FILE_installer-target[destination] = "${@ get_installer_destination(d, d.getVar('IMAGE_DATA_POSTFIX'))}"
>   ROOTFS_ADDITIONAL_FILE_installer-target-bmap[source] = "${@ get_installer_source(d, "wic.bmap")}"
>   ROOTFS_ADDITIONAL_FILE_installer-target-bmap[destination] = "${@ get_installer_destination(d, "wic.bmap")}"
>   
> -do_rootfs_install[mcdepends] += "${@ get_mc_depends(d, "do_image_wic")}"
> +INSTALLER_TARGET_TASK ??="do_image_${@ get_image_type(d.getVar('IMAGE_DATA_POSTFIX'))}"
> +do_rootfs_install[mcdepends] += "${@ get_mc_depends(d, d.getVar('INSTALLER_TARGET_TASK'))}"

-- 
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+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/4d4823c1-5040-4225-abfd-aab37d100e67%40ilbers.de.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-29  7:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-16 14:36 [PATCH] installer-add-rootfs: build target image for image data postfix 'Clara Kowalsky' via isar-users
2025-10-29  7:53 ` Zhihang Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox