Message ID | 20240524084334.2114305-1-Quirin.Gylstorff@siemens.com |
---|---|
State | Accepted, archived |
Headers | show |
Series | installer-add-rootfs: check if installer image is not empty before add mcdepends | expand |
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.
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")}"