diff options
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-x | scripts/oe-buildenv-internal | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal index 485d4c52e1..2fdb19565a 100755 --- a/scripts/oe-buildenv-internal +++ b/scripts/oe-buildenv-internal @@ -32,12 +32,12 @@ fi # We potentially have code that doesn't parse correctly with older versions # of Python, and rather than fixing that and being eternally vigilant for # any other new feature use, just check the version here. -py_v35_check=$(python3 -c 'import sys; print(sys.version_info >= (3,5,0))') -if [ "$py_v35_check" != "True" ]; then - echo >&2 "BitBake requires Python 3.5.0 or later as 'python3 (scripts/install-buildtools can be used if needed)'" +py_v38_check=$(python3 -c 'import sys; print(sys.version_info >= (3,8,0))') +if [ "$py_v38_check" != "True" ]; then + echo >&2 "BitBake requires Python 3.8.0 or later as 'python3' (scripts/install-buildtools can be used if needed)" return 1 fi -unset py_v35_check +unset py_v38_check if [ -z "$BDIR" ]; then if [ -z "$1" ]; then @@ -92,19 +92,20 @@ fi PYTHONPATH=$BITBAKEDIR/lib:$PYTHONPATH export PYTHONPATH +# Remove any paths added by sourcing this script before +[ -n "$OE_ADDED_PATHS" ] && PATH=$(echo $PATH | sed -e "s#$OE_ADDED_PATHS##") || + PATH=$(echo $PATH | sed -e "s#$OEROOT/scripts:$BITBAKEDIR/bin:##") + # Make sure our paths are at the beginning of $PATH -for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do - # Remove any existences of $newpath from $PATH - PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\2#g;s#^:##") +OE_ADDED_PATHS="$OEROOT/scripts:$BITBAKEDIR/bin:" +PATH="$OE_ADDED_PATHS$PATH" +export OE_ADDED_PATHS - # Add $newpath to $PATH - PATH="$newpath:$PATH" -done -unset BITBAKEDIR newpath +# This is not needed anymore +unset BITBAKEDIR # Used by the runqemu script export BUILDDIR -export PATH BB_ENV_PASSTHROUGH_ADDITIONS_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \ HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \ |