1
0
mirror of https://git.yoctoproject.org/poky synced 2026-04-20 23:39:22 +00:00

isoimage-isohybrid: don't use TRANSLATED_TARGET_ARCH

isoimage-isohybrid plugin fails with this error when
trying to find initrd image:
    initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, target_arch, image_type))[0]
    IndexError: list index out of range
as it uses TRANSLATED_TARGET_ARCH value as part of the image.
This approach stopped to work due to changes in oe core code.

initrd file name is made using MACHINE variable. wic can't get value
of this variable as it's not included into bitbake -e output.

Used basename of deploy dir as MACHINE value to fix the breakage.

(From OE-Core rev: cfbb3cc1279ea88ca3e2867f8a409c5120aa1f05)

(From OE-Core rev: e26fa1c34c33ffdc678f8073dade0126aff08b40)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh
2017-05-17 12:49:12 +00:00
committed by Richard Purdie
parent 2d739a352b
commit 684534198f
2 changed files with 3 additions and 5 deletions

View File

@@ -162,11 +162,9 @@ class IsoImagePlugin(SourcePlugin):
if not image_type:
raise WicError("Couldn't find INITRAMFS_FSTYPES, exiting.")
target_arch = get_bitbake_var("TRANSLATED_TARGET_ARCH")
if not target_arch:
raise WicError("Couldn't find TRANSLATED_TARGET_ARCH, exiting.")
machine = os.path.basename(initrd_dir)
initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, target_arch, image_type))[0]
initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, machine, image_type))[0]
if not os.path.exists(initrd):
# Create initrd from rootfs directory