diff options
Diffstat (limited to 'meta/classes/devshell.bbclass')
| -rw-r--r-- | meta/classes/devshell.bbclass | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass index ddb6e55303..a780118a12 100644 --- a/meta/classes/devshell.bbclass +++ b/meta/classes/devshell.bbclass | |||
| @@ -1,10 +1,27 @@ | |||
| 1 | inherit terminal | 1 | inherit terminal |
| 2 | 2 | ||
| 3 | DEVSHELL = "${SHELL}" | ||
| 4 | |||
| 3 | python do_devshell () { | 5 | python do_devshell () { |
| 4 | oe_terminal(d.getVar('SHELL', True), 'OpenEmbedded Developer Shell', d) | 6 | oe_terminal(d.getVar('DEVSHELL', True), 'OpenEmbedded Developer Shell', d) |
| 5 | } | 7 | } |
| 6 | 8 | ||
| 7 | addtask devshell after do_patch | 9 | addtask devshell after do_patch |
| 8 | 10 | ||
| 9 | do_devshell[dirs] = "${S}" | 11 | do_devshell[dirs] = "${S}" |
| 10 | do_devshell[nostamp] = "1" | 12 | do_devshell[nostamp] = "1" |
| 13 | |||
| 14 | # devshell and fakeroot/pseudo need careful handling since only the final | ||
| 15 | # command should run under fakeroot emulation, any X connection should | ||
| 16 | # be done as the normal user. We therfore carefully construct the envionment | ||
| 17 | # manually | ||
| 18 | python () { | ||
| 19 | if d.getVarFlag("do_devshell", "fakeroot"): | ||
| 20 | d.prependVar("DEVSHELL", "pseudo ") | ||
| 21 | fakeenv = d.getVar("FAKEROOTENV", True).split() | ||
| 22 | for f in fakeenv: | ||
| 23 | k = f.split("=") | ||
| 24 | d.setVar(k[0], k[1]) | ||
| 25 | d.appendVar("OE_TERMINAL_EXPORTS", " " + k[0]) | ||
| 26 | d.delVarFlag("do_devshell", "fakeroot") | ||
| 27 | } | ||
