From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- meta/classes/devshell.bbclass | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 meta/classes/devshell.bbclass (limited to 'meta/classes/devshell.bbclass') 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 @@ +inherit terminal + +DEVSHELL = "${SHELL}" + +python do_devshell () { + if d.getVarFlag("do_devshell", "manualfakeroot"): + d.prependVar("DEVSHELL", "pseudo ") + fakeenv = d.getVar("FAKEROOTENV", True).split() + for f in fakeenv: + k = f.split("=") + d.setVar(k[0], k[1]) + d.appendVar("OE_TERMINAL_EXPORTS", " " + k[0]) + d.delVarFlag("do_devshell", "fakeroot") + + oe_terminal(d.getVar('DEVSHELL', True), 'OpenEmbedded Developer Shell', d) +} + +addtask devshell after do_patch + +do_devshell[dirs] = "${S}" +do_devshell[nostamp] = "1" + +# devshell and fakeroot/pseudo need careful handling since only the final +# command should run under fakeroot emulation, any X connection should +# be done as the normal user. We therfore carefully construct the envionment +# manually +python () { + if d.getVarFlag("do_devshell", "fakeroot"): + # We need to signal our code that we want fakeroot however we + # can't manipulate the environment and variables here yet (see YOCTO #4795) + d.setVarFlag("do_devshell", "manualfakeroot", "1") + d.delVarFlag("do_devshell", "fakeroot") +} -- cgit v1.2.3-54-g00ecf