diff options
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-x | scripts/oe-buildenv-internal | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal index ba0a9b44d6..2fdb19565a 100755 --- a/scripts/oe-buildenv-internal +++ b/scripts/oe-buildenv-internal | |||
@@ -32,12 +32,12 @@ fi | |||
32 | # We potentially have code that doesn't parse correctly with older versions | 32 | # We potentially have code that doesn't parse correctly with older versions |
33 | # of Python, and rather than fixing that and being eternally vigilant for | 33 | # of Python, and rather than fixing that and being eternally vigilant for |
34 | # any other new feature use, just check the version here. | 34 | # any other new feature use, just check the version here. |
35 | py_v35_check=$(python3 -c 'import sys; print(sys.version_info >= (3,5,0))') | 35 | py_v38_check=$(python3 -c 'import sys; print(sys.version_info >= (3,8,0))') |
36 | if [ "$py_v35_check" != "True" ]; then | 36 | if [ "$py_v38_check" != "True" ]; then |
37 | echo >&2 "BitBake requires Python 3.5.0 or later as 'python3 (scripts/install-buildtools can be used if needed)'" | 37 | echo >&2 "BitBake requires Python 3.8.0 or later as 'python3' (scripts/install-buildtools can be used if needed)" |
38 | return 1 | 38 | return 1 |
39 | fi | 39 | fi |
40 | unset py_v35_check | 40 | unset py_v38_check |
41 | 41 | ||
42 | if [ -z "$BDIR" ]; then | 42 | if [ -z "$BDIR" ]; then |
43 | if [ -z "$1" ]; then | 43 | if [ -z "$1" ]; then |
@@ -88,27 +88,32 @@ if [ ! -d "$BITBAKEDIR" ]; then | |||
88 | return 1 | 88 | return 1 |
89 | fi | 89 | fi |
90 | 90 | ||
91 | # Add BitBake's library to PYTHONPATH | ||
92 | PYTHONPATH=$BITBAKEDIR/lib:$PYTHONPATH | ||
93 | export PYTHONPATH | ||
94 | |||
95 | # Remove any paths added by sourcing this script before | ||
96 | [ -n "$OE_ADDED_PATHS" ] && PATH=$(echo $PATH | sed -e "s#$OE_ADDED_PATHS##") || | ||
97 | PATH=$(echo $PATH | sed -e "s#$OEROOT/scripts:$BITBAKEDIR/bin:##") | ||
98 | |||
91 | # Make sure our paths are at the beginning of $PATH | 99 | # Make sure our paths are at the beginning of $PATH |
92 | for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do | 100 | OE_ADDED_PATHS="$OEROOT/scripts:$BITBAKEDIR/bin:" |
93 | # Remove any existences of $newpath from $PATH | 101 | PATH="$OE_ADDED_PATHS$PATH" |
94 | PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\2#g;s#^:##") | 102 | export OE_ADDED_PATHS |
95 | 103 | ||
96 | # Add $newpath to $PATH | 104 | # This is not needed anymore |
97 | PATH="$newpath:$PATH" | 105 | unset BITBAKEDIR |
98 | done | ||
99 | unset BITBAKEDIR newpath | ||
100 | 106 | ||
101 | # Used by the runqemu script | 107 | # Used by the runqemu script |
102 | export BUILDDIR | 108 | export BUILDDIR |
103 | export PATH | ||
104 | 109 | ||
105 | BB_ENV_EXTRAWHITE_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \ | 110 | BB_ENV_PASSTHROUGH_ADDITIONS_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \ |
106 | HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \ | 111 | HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \ |
107 | all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \ | 112 | all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \ |
108 | SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \ | 113 | SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \ |
109 | SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR BBPATH_EXTRA BB_SETSCENE_ENFORCE \ | 114 | SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR BBPATH_EXTRA BB_SETSCENE_ENFORCE \ |
110 | BB_LOGCONFIG" | 115 | BB_LOGCONFIG" |
111 | 116 | ||
112 | BB_ENV_EXTRAWHITE="$(echo $BB_ENV_EXTRAWHITE $BB_ENV_EXTRAWHITE_OE | tr ' ' '\n' | LC_ALL=C sort --unique | tr '\n' ' ')" | 117 | BB_ENV_PASSTHROUGH_ADDITIONS="$(echo $BB_ENV_PASSTHROUGH_ADDITIONS $BB_ENV_PASSTHROUGH_ADDITIONS_OE | tr ' ' '\n' | LC_ALL=C sort --unique | tr '\n' ' ')" |
113 | 118 | ||
114 | export BB_ENV_EXTRAWHITE | 119 | export BB_ENV_PASSTHROUGH_ADDITIONS |