diff options
author | Andre McCurdy <armccurdy@gmail.com> | 2016-03-24 10:49:22 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-28 15:55:48 +0100 |
commit | 33a6135294f2082710915fd2d8e1c457af284784 (patch) | |
tree | 9f5d983ea17ba03f52ab782c5a4073ada22d1573 /scripts/oe-buildenv-internal | |
parent | c6ab82882cd49be5510d1f8c967d0dc2da2490c2 (diff) | |
download | poky-33a6135294f2082710915fd2d8e1c457af284784.tar.gz |
oe-buildenv-internal: simplify derivation of BB_ENV_EXTRAWHITE
Use 'sort --unique' to combine the two lists and remove duplicates.
(From OE-Core rev: ada4639f1e2952e144ea7dfb2a784181d7fcc96a)
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-x | scripts/oe-buildenv-internal | 23 |
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 | |||
110 | export BUILDDIR | 110 | export BUILDDIR |
111 | export PATH | 111 | export PATH |
112 | 112 | ||
113 | add_extrawhite() { | 113 | BB_ENV_EXTRAWHITE_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \ |
114 | # If the current shell is zsh, then temporarily set it to emulate sh in this | ||
115 | # function so that the for and case statements below work as expected. | ||
116 | [ -z "$ZSH_NAME" ] || emulate -L sh | ||
117 | |||
118 | local extrawhite="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \ | ||
119 | HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \ | 114 | HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \ |
120 | all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \ | 115 | all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \ |
121 | SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \ | 116 | SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \ |
122 | SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR" | 117 | SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR" |
123 | 118 | ||
124 | local var | 119 | BB_ENV_EXTRAWHITE=$(echo $BB_ENV_EXTRAWHITE $BB_ENV_EXTRAWHITE_OE | sed 's/ /\n/g' | LC_ALL=C sort --unique) |
125 | for var in $extrawhite; do | 120 | |
126 | case " $BB_ENV_EXTRAWHITE " in | ||
127 | *[[:blank:]]$var[[:blank:]]*) | ||
128 | ;; | ||
129 | *) | ||
130 | BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE:+$BB_ENV_EXTRAWHITE }$var" | ||
131 | ;; | ||
132 | esac | ||
133 | done | ||
134 | } | ||
135 | |||
136 | add_extrawhite | ||
137 | unset -f add_extrawhite | ||
138 | export BB_ENV_EXTRAWHITE | 121 | export BB_ENV_EXTRAWHITE |