summaryrefslogtreecommitdiffstats
path: root/meta/classes/devshell.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-05 16:17:27 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-06 23:04:49 +0100
commit5963d24ec5be437717c5ce6ecac291d2e3263a35 (patch)
treeacb30ec5055300017f78fd3525b9322c223701be /meta/classes/devshell.bbclass
parent75a14923da1ba91eddde47f0907345c19c82d6f0 (diff)
downloadpoky-5963d24ec5be437717c5ce6ecac291d2e3263a35.tar.gz
devshell: Don't corrupt the fakeroot variables
The devshell anonymous python fragment overwrites variables in the datastore with their expanded versions. If this runs before the code in allarch.bbclass which changes TARGET_OS, we can end up with different directories in the fakeroot environment variables, some expanded with the original TARGET_OS value. The devshell code only needs to run before the task itself so we change to trigger it to run at task execution time only using a flag. [YOCTO #4795] (From OE-Core rev: 56baf177cdf074929a090cc66a8b89d346a5d79c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/devshell.bbclass')
-rw-r--r--meta/classes/devshell.bbclass18
1 files changed, 12 insertions, 6 deletions
diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
index a780118a12..92edb9ef25 100644
--- a/meta/classes/devshell.bbclass
+++ b/meta/classes/devshell.bbclass
@@ -3,6 +3,15 @@ inherit terminal
3DEVSHELL = "${SHELL}" 3DEVSHELL = "${SHELL}"
4 4
5python do_devshell () { 5python 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
6 oe_terminal(d.getVar('DEVSHELL', True), 'OpenEmbedded Developer Shell', d) 15 oe_terminal(d.getVar('DEVSHELL', True), 'OpenEmbedded Developer Shell', d)
7} 16}
8 17
@@ -17,11 +26,8 @@ do_devshell[nostamp] = "1"
17# manually 26# manually
18python () { 27python () {
19 if d.getVarFlag("do_devshell", "fakeroot"): 28 if d.getVarFlag("do_devshell", "fakeroot"):
20 d.prependVar("DEVSHELL", "pseudo ") 29 # We need to signal our code that we want fakeroot however we
21 fakeenv = d.getVar("FAKEROOTENV", True).split() 30 # can't manipulate the environment and variables here yet (see YOCTO #4795)
22 for f in fakeenv: 31 d.setVarFlag("do_devshell", "manualfakeroot", "1")
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") 32 d.delVarFlag("do_devshell", "fakeroot")
27} 33}