[oe-commits] [openembedded-core] 11/14: runqemu: exit gracefully with an error message if qemu system is not evaluated

git at git.openembedded.org git at git.openembedded.org
Thu Oct 18 10:10:25 UTC 2018


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

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

commit bc030c9f5af4af5a8bad48bc8beca9324a65d25b
Author: Jagadeesh Krishnanjanappa <jkrishnanjanappa at mvista.com>
AuthorDate: Tue Aug 14 20:05:29 2018 +0530

    runqemu: exit gracefully with an error message if qemu system is not evaluated
    
    It solves below error:
    -- snip --
    return 'qemu-system-%s' % qbsys
    UnboundLocalError: local variable 'qbsys' referenced before assignment
    -- snip --
    
    [YOCTO #12846]
    
    (From OE-Core rev: 519273f54c0b8a6fff36afeb7646d8e37717be22)
    
    Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa at mvista.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 scripts/runqemu | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/runqemu b/scripts/runqemu
index de42d0f..cb36c20 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1115,6 +1115,11 @@ class BaseConfig(object):
             qbsys = 'riscv64'
         elif mach == 'qemuriscv32':
             qbsys = 'riscv32'
+        else:
+            logger.error("Unable to determine QEMU PC System emulator for %s machine." % mach)
+            logger.error("As %s is not among valid QEMU machines such as," % mach)
+            logger.error("qemux86-64, qemux86, qemuarm64, qemuarm, qemumips64, qemumips64el, qemumipsel, qemumips, qemuppc")
+            raise RunQemuError("Set qb_system_name with suitable QEMU PC System emulator in .*qemuboot.conf.")
 
         return 'qemu-system-%s' % qbsys
 

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


More information about the Openembedded-commits mailing list