[oe-commits] [openembedded-core] 66/82: oe-buildenv-internal: Add variables individually to BB_ENV_EXTRAWHITE
git at git.openembedded.org
git at git.openembedded.org
Sun Mar 20 07:53:16 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 1d3abc476c1fa63d01bf45da5389f49d88ad6d5d
Author: Peter Kjellerstedt <pkj at axis.com>
AuthorDate: Tue Mar 15 17:53:31 2016 +0100
oe-buildenv-internal: Add variables individually to BB_ENV_EXTRAWHITE
Instead of adding all variables to BB_ENV_EXTRAWHITE as one, treat
them separately and add them one by one as needed.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
scripts/oe-buildenv-internal | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index 85f82f1..354501e 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -108,13 +108,29 @@ unset BITBAKEDIR newpath
export BUILDDIR
export PATH
-BB_ENV_EXTRAWHITE_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \
+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 \
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"
-echo "$BB_ENV_EXTRAWHITE" | grep -q "${BB_ENV_EXTRAWHITE_OE}"
-if [ $? != 0 ]; then
- export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE_OE} $BB_ENV_EXTRAWHITE"
-fi
+ 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
+export BB_ENV_EXTRAWHITE
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list