[oe-commits] [openembedded-core] 16/16: isoimage-isohybrid: don't use TRANSLATED_TARGET_ARCH

git at git.openembedded.org git at git.openembedded.org
Tue May 23 16:46:49 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit deab996cd754d14df28bde02177b14b12d8ebd45
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Wed May 17 12:49:12 2017 +0000

    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.
    
    Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/image_types_wic.bbclass                 | 2 +-
 scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/meta/classes/image_types_wic.bbclass b/meta/classes/image_types_wic.bbclass
index 3b73261..dcf67e3 100644
--- a/meta/classes/image_types_wic.bbclass
+++ b/meta/classes/image_types_wic.bbclass
@@ -3,7 +3,7 @@
 WICVARS ?= "\
            BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD IMAGE_BASENAME IMAGE_BOOT_FILES \
            IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \
-           ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS TRANSLATED_TARGET_ARCH"
+           ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS"
 
 WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
 WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
diff --git a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 1ceba62..b464263 100644
--- a/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list