public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Quirin Gylstorff <Quirin.Gylstorff@siemens.com>
To: isar-users@googlegroups.com
Subject: [PATCH] installer-add-rootfs: check if  installer image is not empty before add mcdepends
Date: Fri, 24 May 2024 10:43:15 +0200	[thread overview]
Message-ID: <20240524084334.2114305-1-Quirin.Gylstorff@siemens.com> (raw)

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


             reply	other threads:[~2024-05-24  8:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24  8:43 Quirin Gylstorff [this message]
2024-06-03  6:36 ` Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240524084334.2114305-1-Quirin.Gylstorff@siemens.com \
    --to=quirin.gylstorff@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox