Skip to content

Commit

Permalink
bundle.bbclass: use IMAGE_NAME_SUFFIX instead of hard-coded '.rootfs'
Browse files Browse the repository at this point in the history
.rootfs is just the default for IMAGE_NAME_SUFFIX but could be changed
by users.

Inherit image-artifact-names class where the variable is defined.

Signed-off-by: Enrico Jorns <[email protected]>
  • Loading branch information
ejoerns committed Feb 1, 2024
1 parent 3a1fbab commit 3e96177
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes-recipe/bundle.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ CONVERT_ARGS[doc] = "Specifies any extra arguments to pass to the rauc convert c
DEPENDS = "rauc-native squashfs-tools-native"
DEPENDS += "${@bb.utils.contains('RAUC_CASYNC_BUNDLE', '1', 'virtual/fakeroot-native casync-native', '', d)}"

inherit image-artifact-names

def write_manifest(d):
import shutil
import subprocess
Expand Down Expand Up @@ -251,7 +253,7 @@ def write_manifest(d):
img_fstype = slotflags.get('fstype', d.getVar('RAUC_IMAGE_FSTYPE'))

if imgtype == 'image':
fallback = "%s-%s.rootfs.%s" % (d.getVar('RAUC_SLOT_%s' % slot), machine, img_fstype)
fallback = "%s-%s%s.%s" % (d.getVar('RAUC_SLOT_%s' % slot), machine, d.getVar('IMAGE_NAME_SUFFIX'), img_fstype)
imgname = imgsource = slotflags.get('file', fallback)
elif imgtype == 'kernel':
# TODO: Add image type support
Expand Down

0 comments on commit 3e96177

Please sign in to comment.