summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2016-03-24 10:49:22 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-26 22:49:36 +0000
commitada4639f1e2952e144ea7dfb2a784181d7fcc96a (patch)
treee3ca4604765b1be95887463c6d7ccee5d0f5e740
parenteb90d1c8fc7b82ca2593185930b3bf175f40ae13 (diff)
downloadopenembedded-core-contrib-ada4639f1e2952e144ea7dfb2a784181d7fcc96a.tar.gz
openembedded-core-contrib-ada4639f1e2952e144ea7dfb2a784181d7fcc96a.tar.bz2
openembedded-core-contrib-ada4639f1e2952e144ea7dfb2a784181d7fcc96a.zip
oe-buildenv-internal: simplify derivation of BB_ENV_EXTRAWHITE
Use 'sort --unique' to combine the two lists and remove duplicates. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/oe-buildenv-internal23
1 files changed, 3 insertions, 20 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index 8eee0087a9..be212f2cd0 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -110,29 +110,12 @@ unset BITBAKEDIR newpath
export BUILDDIR
export PATH
-add_extrawhite() {
- # If the current shell is zsh, then temporarily set it to emulate sh in this
- # function so that the for and case statements below work as expected.
- [ -z "$ZSH_NAME" ] || emulate -L sh
-
- local extrawhite="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \
+BB_ENV_EXTRAWHITE_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \
HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \
all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \
SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \
SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR"
- local var
- for var in $extrawhite; do
- case " $BB_ENV_EXTRAWHITE " in
- *[[:blank:]]$var[[:blank:]]*)
- ;;
- *)
- BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE:+$BB_ENV_EXTRAWHITE }$var"
- ;;
- esac
- done
-}
-
-add_extrawhite
-unset -f add_extrawhite
+BB_ENV_EXTRAWHITE=$(echo $BB_ENV_EXTRAWHITE $BB_ENV_EXTRAWHITE_OE | sed 's/ /\n/g' | LC_ALL=C sort --unique)
+
export BB_ENV_EXTRAWHITE