From: Andre McCurdy Date: Thu, 24 Mar 2016 17:49:22 +0000 (-0700) Subject: oe-buildenv-internal: simplify derivation of BB_ENV_EXTRAWHITE X-Git-Tag: 2016-4~281 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=ada4639f1e2952e144ea7dfb2a784181d7fcc96a;p=openembedded-core.git 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 Signed-off-by: Richard Purdie --- 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