[oe-commits] [openembedded-core] 21/29: runqemu: work even if a *.qemuboot.conf isn't found

git at git.openembedded.org git at git.openembedded.org
Mon Sep 19 08:12:15 UTC 2016


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

commit 3541c21f1976b517b79a19882240a8f36b970292
Author: Joshua Lock <joshua.g.lock at intel.com>
AuthorDate: Sun Sep 18 00:39:28 2016 -0700

    runqemu: work even if a *.qemuboot.conf isn't found
    
    A qemuboot conf file is a convenience but it should still be
    possible to invoke runqemu without them, especially for examples
    such as using the SDK with an extracted rootfs via NFS.
    
    As read_qemuboot() is always called we need to be sure that function
    can return cleanly, without throwing Exceptions, even if a qemuboot
    conf file isn't found.
    
    Signed-off-by: Joshua Lock <joshua.g.lock at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/runqemu | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 3e4e3ff..4050dcc 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -557,7 +557,8 @@ class BaseConfig(object):
             elif os.getenv('DEPLOY_DIR_IMAGE'):
                 deploy_dir_image = os.getenv('DEPLOY_DIR_IMAGE')
             else:
-                raise OEPathError("DEPLOY_DIR_IMAGE is NULL!")
+                logger.info("Can't find qemuboot conf file, DEPLOY_DIR_IMAGE is NULL!")
+                return
 
             if self.rootfs and not os.path.exists(self.rootfs):
                 # Lazy rootfs
@@ -574,6 +575,11 @@ class BaseConfig(object):
                     self.qemuboot = qbs.split()[0]
                     self.qbconfload = True
 
+        if not self.qemuboot:
+            # If we haven't found a .qemuboot.conf at this point it probably
+            # doesn't exist, continue without
+            return
+
         if not os.path.exists(self.qemuboot):
             raise Exception("Failed to find <image>.qemuboot.conf!")
 

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


More information about the Openembedded-commits mailing list