[meta-swupdate][PATCH] Use IMAGE_NAME_SUFFIX in the artifact name

11 views
Skip to first unread message

Stefano Babic

unread,
Nov 11, 2024, 4:32:55 AM11/11/24
to swup...@googlegroups.com, Stefano Babic
Since scarthgap, IMAGE_NAME_SUFFIX is set as default and this causes
breakages because the suffix must be added to SWUPDATE_IMAGE_FSTYPES,
else the artifact is not found. Fix this by adding the suffix to the
artifact name.

Signed-off-by: Stefano Babic <stefan...@swupdate.org>
---
classes-recipe/swupdate-image.bbclass | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/classes-recipe/swupdate-image.bbclass b/classes-recipe/swupdate-image.bbclass
index 0ca7b2d..32afc1f 100644
--- a/classes-recipe/swupdate-image.bbclass
+++ b/classes-recipe/swupdate-image.bbclass
@@ -20,7 +20,9 @@ SWUPDATE_IMAGES += "${IMAGE_BASENAME}"

python () {
image = d.getVar('IMAGE_BASENAME')
- if d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", image) is None:
+ t = d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", image)
+ suffix = d.getVar("IMAGE_NAME_SUFFIX") or ""
+ if t is None:
flag = d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", d.getVar('IMAGE_BASENAME'))
if flag:
d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", image, flag)
@@ -30,8 +32,10 @@ python () {
bb.fatal("SWUPDATE_IMAGES_FSTYPES[%s] is not set !" % image)
for t in fstypes:
bb.warn("SWUPDATE_IMAGES_FSTYPES[%s] not set, setting to %s" % (image, t))
- d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", image, "." + t)
+ d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", image, suffix + "." + t)
break
+ else:
+ d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", image, suffix + t)
}

python do_swupdate_copy_swdescription() {
--
2.43.0

Reply all
Reply to author
Forward
0 new messages