]> code.ossystems Code Review - openembedded-core.git/commitdiff
cml1.bbclass: Only delay exit if the command fails
authorDarren Hart <dvhart@linux.intel.com>
Fri, 15 Jun 2012 21:44:24 +0000 (14:44 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Jun 2012 15:32:14 +0000 (16:32 +0100)
Rather than pause for 5 seconds, test the return code of the command and
require user input before exiting on failure. This avoids pausing after
successful command execution as well as possibly not waiting long enough
if the user happens to be doing something else for 5 seconds.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
meta/classes/cml1.bbclass

index fd80c186979bf1cfd262108401d4338827f27e6f..67f17ad77e0e29647b60ebaa1174c95f49051d2f 100644 (file)
@@ -20,7 +20,7 @@ python do_menuconfig() {
         except OSError:
             mtime = 0
 
-        oe_terminal("${SHELL} -c \"make menuconfig; echo 'Pausing for 5 seconds'; sleep 5\"", '${PN} Configuration', d)
+        oe_terminal("${SHELL} -c \"make menuconfig; if [ $? -ne 0 ]; then echo 'Command failed.'; echo -n 'Press any key to continue... '; read r; fi\"", '${PN} Configuration', d)
 
         # FIXME this check can be removed when the minimum bitbake version has been bumped
         if hasattr(bb.build, 'write_taint'):