* [PATCH] installer-add-rootfs: check if installer image is not empty before add mcdepends
@ 2024-05-24 8:43 Quirin Gylstorff
2024-06-03 6:36 ` Uladzimir Bely
0 siblings, 1 reply; 2+ messages in thread
From: Quirin Gylstorff @ 2024-05-24 8:43 UTC (permalink / raw)
To: isar-users
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
This fixes the following error in case of a empty installer image:
```
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES ''
```
This fixes issue #104
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
meta-isar/classes/installer-add-rootfs.bbclass | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/meta-isar/classes/installer-add-rootfs.bbclass b/meta-isar/classes/installer-add-rootfs.bbclass
index 656761e7..7767d96e 100644
--- a/meta-isar/classes/installer-add-rootfs.bbclass
+++ b/meta-isar/classes/installer-add-rootfs.bbclass
@@ -35,9 +35,17 @@ def get_installer_destination(d, suffix):
image_data = d.getVar('IMAGE_DATA_FILE')
return f"/install/{image_data}.{suffix}"
+def get_mc_depends(d, task):
+ installer_target_image = d.getVar('INSTALLER_TARGET_IMAGE') or ""
+ if not installer_target_image:
+ return ""
+ installer_mc = d.getVar('INSTALLER_MC') or ""
+ installer_target_mc = d.getVar('INSTALLER_TARGET_MC') or ""
+ return f"mc:{installer_mc}:{installer_target_mc}:{installer_target_image}:{task}"
+
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] += "mc:${INSTALLER_MC}:${INSTALLER_TARGET_MC}:${INSTALLER_TARGET_IMAGE}:do_image_wic"
+do_rootfs_install[mcdepends] += "${@ get_mc_depends(d, "do_image_wic")}"
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] installer-add-rootfs: check if installer image is not empty before add mcdepends
2024-05-24 8:43 [PATCH] installer-add-rootfs: check if installer image is not empty before add mcdepends Quirin Gylstorff
@ 2024-06-03 6:36 ` Uladzimir Bely
0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2024-06-03 6:36 UTC (permalink / raw)
To: Quirin Gylstorff, isar-users
On Fri, 2024-05-24 at 10:43 +0200, 'Quirin Gylstorff' via isar-users
wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>
> This fixes the following error in case of a empty installer image:
> ```
> NOTE: Resolving any missing task queue dependencies
> NOTE: Resolving any missing task queue dependencies
> NOTE: Resolving any missing task queue dependencies
> ERROR: Nothing PROVIDES ''
> ```
>
> This fixes issue #104
>
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
> meta-isar/classes/installer-add-rootfs.bbclass | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/meta-isar/classes/installer-add-rootfs.bbclass b/meta-
> isar/classes/installer-add-rootfs.bbclass
> index 656761e7..7767d96e 100644
> --- a/meta-isar/classes/installer-add-rootfs.bbclass
> +++ b/meta-isar/classes/installer-add-rootfs.bbclass
> @@ -35,9 +35,17 @@ def get_installer_destination(d, suffix):
> image_data = d.getVar('IMAGE_DATA_FILE')
> return f"/install/{image_data}.{suffix}"
>
> +def get_mc_depends(d, task):
> + installer_target_image = d.getVar('INSTALLER_TARGET_IMAGE') or
> ""
> + if not installer_target_image:
> + return ""
> + installer_mc = d.getVar('INSTALLER_MC') or ""
> + installer_target_mc = d.getVar('INSTALLER_TARGET_MC') or ""
> + return
> f"mc:{installer_mc}:{installer_target_mc}:{installer_target_image}:{t
> ask}"
> +
> 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] +=
> "mc:${INSTALLER_MC}:${INSTALLER_TARGET_MC}:${INSTALLER_TARGET_IMAGE}:
> do_image_wic"
> +do_rootfs_install[mcdepends] += "${@ get_mc_depends(d,
> "do_image_wic")}"
> --
> 2.43.0
>
Applied to next, thanks.
--
Best regards,
Uladzimir.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-03 6:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-24 8:43 [PATCH] installer-add-rootfs: check if installer image is not empty before add mcdepends Quirin Gylstorff
2024-06-03 6:36 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox