[oe-commits] Darren Hart : cml1.bbclass: Only delay exit if the command fails

git at git.openembedded.org git at git.openembedded.org
Mon Jun 25 15:33:24 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: d99cc2b70bbda9a0cbc09a4430b871c287113041
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=d99cc2b70bbda9a0cbc09a4430b871c287113041

Author: Darren Hart <dvhart at linux.intel.com>
Date:   Fri Jun 15 14:44:24 2012 -0700

cml1.bbclass: Only delay exit if the command fails

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 at linux.intel.com>

---

 meta/classes/cml1.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index fd80c18..67f17ad 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -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'):





More information about the Openembedded-commits mailing list