summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/cml1.bbclass22
1 files changed, 1 insertions, 21 deletions
diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index 0bab22efed..eb8e7907f6 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -26,28 +26,8 @@ python do_menuconfig() {
26 except OSError: 26 except OSError:
27 mtime = 0 27 mtime = 0
28 28
29 # We need to know when the command completes but some terminals (including gnome-terminal 29 oe_terminal("${SHELL} -c \"make %s; if [ \$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'),
30 # and tmux) gives us no way to do this. We therefore write the pid to a temporal file
31 # then monitor the pid until it exits.
32 import tempfile
33 pidfile = tempfile.NamedTemporaryFile(delete = False).name
34 try:
35 oe_terminal("${SHELL} -c \"echo $$ > %s; make %s; if [ \$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % (pidfile, d.getVar('KCONFIG_CONFIG_COMMAND')),
36 d.getVar('PN') + ' Configuration', d) 30 d.getVar('PN') + ' Configuration', d)
37 while os.stat(pidfile).st_size <= 0:
38 continue
39 with open(pidfile, "r") as f:
40 pid = int(f.readline())
41 finally:
42 os.unlink(pidfile)
43
44 import time
45 while True:
46 try:
47 os.kill(pid, 0)
48 time.sleep(0.1)
49 except OSError:
50 break
51 31
52 # FIXME this check can be removed when the minimum bitbake version has been bumped 32 # FIXME this check can be removed when the minimum bitbake version has been bumped
53 if hasattr(bb.build, 'write_taint'): 33 if hasattr(bb.build, 'write_taint'):