[oe-commits] [openembedded-core] 06/28: oe-buildenv-internal: simplify derivation of BB_ENV_EXTRAWHITE

git at git.openembedded.org git at git.openembedded.org
Sat Mar 26 08:04:15 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit c8ae84bb344a772b875d2f17603437e55410b2d3
Author: Andre McCurdy <armccurdy at gmail.com>
AuthorDate: Thu Mar 24 10:49:22 2016 -0700

    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 at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/oe-buildenv-internal | 23 +++--------------------
 1 file changed, 3 insertions(+), 20 deletions(-)

diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index 8eee008..be212f2 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list