diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-05 16:17:27 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-06 23:01:50 +0100 |
commit | 56baf177cdf074929a090cc66a8b89d346a5d79c (patch) | |
tree | f33ebc1b22d3c0d5fd00d54eae2fcd43a7efb7a5 /meta/classes | |
parent | 882da38f226acc40c041155218549edad461b7d7 (diff) | |
download | openembedded-core-56baf177cdf074929a090cc66a8b89d346a5d79c.tar.gz openembedded-core-56baf177cdf074929a090cc66a8b89d346a5d79c.tar.bz2 openembedded-core-56baf177cdf074929a090cc66a8b89d346a5d79c.zip |
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]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/devshell.bbclass | 18 |
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 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) } @@ -17,11 +26,8 @@ do_devshell[nostamp] = "1" # manually python () { if d.getVarFlag("do_devshell", "fakeroot"): - 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]) + # 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") } |