From 0e3f04c42976dd30c892baf1c74cde66467589ea Mon Sep 17 00:00:00 2001 From: LWisteria Date: Fri, 29 Jun 2018 14:55:32 +0900 Subject: [PATCH] Check wget version iff wget is going to be used reapplying 4ebba7cd5f33386e1ddbffe9e020be20f229c509 , which is (accidently?) reverted by fc90785f75461b8eb67b0a9c3d74f1e4932c9c6f --- plugins/python-build/bin/python-build | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 8108e9fb..75725312 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -339,6 +339,11 @@ http() { elif type curl &>/dev/null; then http_client="http_${method}_curl" elif type wget &>/dev/null; then + # SSL Certificate error with older wget that does not support Server Name Indication (#60) + if [[ "$(wget --version 2>/dev/null || true)" = "GNU Wget 1.1"[0-3]* ]]; then + echo "python-build: wget (< 1.14) doesn't support Server Name Indication. Please install curl (>= 7.18.1) and try again" >&2 + return 1 + fi http_client="http_${method}_wget" else echo "error: please install \`aria2c\`, \`curl\` or \`wget\` and try again" >&2 @@ -2040,14 +2045,6 @@ ARIA2_OPTS="${PYTHON_BUILD_ARIA2_OPTS} ${IPV4+--disable-ipv6=true} ${IPV6+--disa CURL_OPTS="${PYTHON_BUILD_CURL_OPTS} ${IPV4+--ipv4} ${IPV6+--ipv6}" WGET_OPTS="${PYTHON_BUILD_WGET_OPTS} ${IPV4+--inet4-only} ${IPV6+--inet6-only}" -if [ -z "${PYTHON_BUILD_HTTP_CLIENT}" ] && ! type aria2c &>/dev/null && ! type curl &>/dev/null; then - # SSL Certificate error with older wget that does not support Server Name Indication (#60) - if [[ "$(wget --version 2>/dev/null || true)" = "GNU Wget 1.1"[0-3]* ]]; then - echo "python-build: wget (< 1.14) doesn't support Server Name Indication. Please install curl (>= 7.18.1) and try again" >&2 - return 1 - fi -fi - # Add an option to build a debug version of Python (#11) if [ -n "$DEBUG" ]; then package_option python configure --with-pydebug