diff options
Diffstat (limited to 'meta/classes/devshell.bbclass')
-rw-r--r-- | meta/classes/devshell.bbclass | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass index 4de7ea6fce..62dc958d9a 100644 --- a/meta/classes/devshell.bbclass +++ b/meta/classes/devshell.bbclass @@ -8,14 +8,14 @@ python do_devshell () { fakeenv = d.getVar("FAKEROOTENV").split() for f in fakeenv: k = f.split("=") - d.setVar(k[0], k[1]) + d.setVar(k[0], k[1]) d.appendVar("OE_TERMINAL_EXPORTS", " " + k[0]) d.delVarFlag("do_devshell", "fakeroot") oe_terminal(d.getVar('DEVSHELL'), 'OpenEmbedded Developer Shell', d) } -addtask devshell after do_patch +addtask devshell after do_patch do_prepare_recipe_sysroot # The directory that the terminal starts in DEVSHELL_STARTDIR ?= "${S}" @@ -34,7 +34,7 @@ python () { d.delVarFlag("do_devshell", "fakeroot") } -def devpyshell(d): +def pydevshell(d): import code import select @@ -49,7 +49,7 @@ def devpyshell(d): old[3] = old[3] &~ termios.ECHO &~ termios.ICANON # &~ termios.ISIG termios.tcsetattr(fd, termios.TCSADRAIN, old) - + # No echo or buffering over the pty noechoicanon(s) @@ -128,6 +128,7 @@ def devpyshell(d): more = i.runsource(source, "<pyshell>") if not more: buf = [] + sys.stderr.flush() prompt(more) except KeyboardInterrupt: i.write("\nKeyboardInterrupt\n") @@ -139,17 +140,17 @@ def devpyshell(d): os.kill(child, signal.SIGTERM) break -python do_devpyshell() { +python do_pydevshell() { import signal try: - devpyshell(d) + pydevshell(d) except SystemExit: - # Stop the SIGTERM above causing an error exit code + # Stop the SIGTERM above causing an error exit code return finally: return } -addtask devpyshell after do_patch +addtask pydevshell after do_patch -do_devpyshell[nostamp] = "1" +do_pydevshell[nostamp] = "1" |