diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2016-03-15 17:53:31 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-20 23:12:30 +0000 |
commit | 4d1efc38ca1485b18da63d5aff3803fe2959c225 (patch) | |
tree | 6bf7d651dc622d896e61f4a6aaab85c9adafde68 /scripts/oe-buildenv-internal | |
parent | 39ac332f660dbbf7d3e05e505c02fce1aaccdf9e (diff) | |
download | poky-4d1efc38ca1485b18da63d5aff3803fe2959c225.tar.gz |
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.
(From OE-Core rev: 516b63fd9dea6fcc304fca920206467d2565dede)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-x | scripts/oe-buildenv-internal | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal index 85f82f1b31..354501ed4b 100755 --- a/scripts/oe-buildenv-internal +++ b/scripts/oe-buildenv-internal | |||
@@ -108,13 +108,29 @@ unset BITBAKEDIR newpath | |||
108 | export BUILDDIR | 108 | export BUILDDIR |
109 | export PATH | 109 | export PATH |
110 | 110 | ||
111 | BB_ENV_EXTRAWHITE_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \ | 111 | add_extrawhite() { |
112 | # If the current shell is zsh, then temporarily set it to emulate sh in this | ||
113 | # function so that the for and case statements below work as expected. | ||
114 | [ -z "$ZSH_NAME" ] || emulate -L sh | ||
115 | |||
116 | local extrawhite="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \ | ||
112 | HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \ | 117 | HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \ |
113 | all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \ | 118 | all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \ |
114 | SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \ | 119 | SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \ |
115 | SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR" | 120 | SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR" |
116 | 121 | ||
117 | echo "$BB_ENV_EXTRAWHITE" | grep -q "${BB_ENV_EXTRAWHITE_OE}" | 122 | local var |
118 | if [ $? != 0 ]; then | 123 | for var in $extrawhite; do |
119 | export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE_OE} $BB_ENV_EXTRAWHITE" | 124 | case " $BB_ENV_EXTRAWHITE " in |
120 | fi | 125 | *[[:blank:]]$var[[:blank:]]*) |
126 | ;; | ||
127 | *) | ||
128 | BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE:+$BB_ENV_EXTRAWHITE }$var" | ||
129 | ;; | ||
130 | esac | ||
131 | done | ||
132 | } | ||
133 | |||
134 | add_extrawhite | ||
135 | unset -f add_extrawhite | ||
136 | export BB_ENV_EXTRAWHITE | ||