[oe-commits] [openembedded-core] 03/07: qemuboot: don't fail when QB_DEFAULT_KERNEL isn't symlink

git at git.openembedded.org git at git.openembedded.org
Wed Sep 28 14:04:41 UTC 2016


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

commit a11d0d8641b7dfb05c78645cf21f2c04a08c4822
Author: Martin Jansa <martin.jansa at gmail.com>
AuthorDate: Wed Sep 28 09:28:49 2016 +0200

    qemuboot: don't fail when QB_DEFAULT_KERNEL isn't symlink
    
    * in some cases we might set QB_DEFAULT_KERNEL to the real filename
      instead of symlink and then this whole readlink work around actually
      breaks the build, because os.readlink fails on normal files:
    
      >>> os.readlink('deploy/images/qemux86/bzImage-linux-yocto-qemux86-master-20160927084848.bin')
      'bzImage-linux-yocto-qemux86.bin'
      >>> os.readlink('deploy/images/qemux86/bzImage-linux-yocto-qemux86.bin')
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      OSError: [Errno 22] Invalid argument: '/jenkins/mjansa/build-starfish-master-mcf/BUILD/deploy/images/qemux86/bzImage-linux-yocto-qemux86.bin'
    
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/qemuboot.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index 97a2357..ef9a128 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -69,7 +69,7 @@ python write_qemuboot_conf() {
     # to the kernel file, which hinders relocatability of the qb conf.
     # Read the link and replace it with the full filename of the target.
     kernel_link = os.path.join(d.getVar('DEPLOY_DIR_IMAGE', True), d.getVar('QB_DEFAULT_KERNEL', True))
-    kernel = os.readlink(kernel_link)
+    kernel = os.path.realpath(kernel_link)
     cf.set('config_bsp', 'QB_DEFAULT_KERNEL', kernel)
 
     bb.utils.mkdirhier(os.path.dirname(qemuboot))

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


More information about the Openembedded-commits mailing list