diff options
| author | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
|---|---|---|
| committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
| commit | c527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch) | |
| tree | bb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/classes/devshell.bbclass | |
| download | poky-daisy-140929.tar.gz | |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/classes/devshell.bbclass')
| -rw-r--r-- | meta/classes/devshell.bbclass | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass new file mode 100644 index 0000000000..92edb9ef25 --- /dev/null +++ b/meta/classes/devshell.bbclass | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | inherit terminal | ||
| 2 | |||
| 3 | DEVSHELL = "${SHELL}" | ||
| 4 | |||
| 5 | python do_devshell () { | ||
| 6 | if d.getVarFlag("do_devshell", "manualfakeroot"): | ||
| 7 | d.prependVar("DEVSHELL", "pseudo ") | ||
| 8 | fakeenv = d.getVar("FAKEROOTENV", True).split() | ||
| 9 | for f in fakeenv: | ||
| 10 | k = f.split("=") | ||
| 11 | d.setVar(k[0], k[1]) | ||
| 12 | d.appendVar("OE_TERMINAL_EXPORTS", " " + k[0]) | ||
| 13 | d.delVarFlag("do_devshell", "fakeroot") | ||
| 14 | |||
| 15 | oe_terminal(d.getVar('DEVSHELL', True), 'OpenEmbedded Developer Shell', d) | ||
| 16 | } | ||
| 17 | |||
| 18 | addtask devshell after do_patch | ||
| 19 | |||
| 20 | do_devshell[dirs] = "${S}" | ||
| 21 | do_devshell[nostamp] = "1" | ||
| 22 | |||
| 23 | # devshell and fakeroot/pseudo need careful handling since only the final | ||
| 24 | # command should run under fakeroot emulation, any X connection should | ||
| 25 | # be done as the normal user. We therfore carefully construct the envionment | ||
| 26 | # manually | ||
| 27 | python () { | ||
| 28 | if d.getVarFlag("do_devshell", "fakeroot"): | ||
| 29 | # We need to signal our code that we want fakeroot however we | ||
| 30 | # can't manipulate the environment and variables here yet (see YOCTO #4795) | ||
| 31 | d.setVarFlag("do_devshell", "manualfakeroot", "1") | ||
| 32 | d.delVarFlag("do_devshell", "fakeroot") | ||
| 33 | } | ||
