]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toolchain-shar-extract.sh: ensure cleaned environment will work for ext SDK
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 8 Dec 2015 02:42:38 +0000 (15:42 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 Dec 2015 17:21:24 +0000 (17:21 +0000)
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.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/files/toolchain-shar-extract.sh

index ef47a6ea0ce6624fabd667eb67ffa163351737c1..606a44e2f97589b5c429a0741c797dc29f5c6948 100644 (file)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 [ -z "$ENVCLEANED" ] && exec /usr/bin/env -i ENVCLEANED=1 "$0" "$@"
+[ -f /etc/environment ] && . /etc/environment
+export PATH=`echo "$PATH" | sed -e 's/:\.//' -e 's/::/:/'`
 
 INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
 SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")