diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-12-08 15:42:38 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-08 17:22:31 +0000 |
commit | cda3905e1b246967ce03a989000d7f374165f2aa (patch) | |
tree | cbde103ba5bb6ee70817e3ec23a8456e99deb92c | |
parent | f9384b0669a5d281e0d251060c453a2b228ea878 (diff) | |
download | poky-cda3905e1b246967ce03a989000d7f374165f2aa.tar.gz |
toolchain-shar-extract.sh: ensure cleaned environment will work for ext SDK
In OE-Core revision 6d2074d477596971dc52027dd87b02af7f39138d we added a
line which re-executes the script with a cleaned environment using
env -i; unfortunately that caused a regression in the extensible SDK on
Ubuntu 14.04 - strangely, there it seems that the value you get for PATH
under env -i contains '.' which triggers a sanity check failure when
preparing the build system. Do a belt-and-braces fix - source
/etc/environment if it exists (so you get a more complete PATH value)
and then filter any nastiness out of PATH for good measure. (Ubuntu
15.04 doesn't seem to suffer from the same problem.)
(From OE-Core rev: 5175d9a6955c1783fc35ab6832b6be4cbb9fc01b)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/files/toolchain-shar-extract.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh index ef47a6ea0c..606a44e2f9 100644 --- a/meta/files/toolchain-shar-extract.sh +++ b/meta/files/toolchain-shar-extract.sh | |||
@@ -1,6 +1,8 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | [ -z "$ENVCLEANED" ] && exec /usr/bin/env -i ENVCLEANED=1 "$0" "$@" | 3 | [ -z "$ENVCLEANED" ] && exec /usr/bin/env -i ENVCLEANED=1 "$0" "$@" |
4 | [ -f /etc/environment ] && . /etc/environment | ||
5 | export PATH=`echo "$PATH" | sed -e 's/:\.//' -e 's/::/:/'` | ||
4 | 6 | ||
5 | INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") | 7 | INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") |
6 | SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") | 8 | SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") |