commit: e996f4832006d3f16d2adba01aec453dcd6fd315 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Sun Nov 30 14:30:02 2025 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Sun Nov 30 14:30:02 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e996f483
scripts/bootstrap-prefix: enforce wget-1 in stage1 wget2 doesn't work with Portage's default config, so ensure we have wget1 post-stage1 (e.g. that the bootstrapped Portage van work with it). Closes: https://bugs.gentoo.org/953843 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> scripts/bootstrap-prefix.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 7c618a3a58..17f36cf59d 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -652,9 +652,10 @@ bootstrap_portage() { -i lib/_emerge/AbstractEbuildProcess.py || \ return 1 - # host-provided wget may lack certificates, stage1 wget is without ssl + # host may lack (sufficient) certificates [[ $(wget -h) == *"--no-check-certificate"* ]] && - sed -e '/wget/s/ --passive-ftp /&--no-check-certificate /' -i cnf/make.globals + sed -e '/wget/s/ --passive-ftp /&--no-check-certificate /' \ + -i cnf/make.globals # Portage checks for valid shebangs. These may (xz-utils) originate # in CONFIG_SHELL (AIX), which originates in PORTAGE_BASH then. @@ -1731,8 +1732,9 @@ bootstrap_stage1() { || (bootstrap_make) || return 1 [[ ${OFFLINE_MODE} ]] || [[ -x ${ROOT}/tmp/usr/bin/openssl ]] \ || (bootstrap_libressl) # try without on failure - [[ ${OFFLINE_MODE} ]] || type -P wget > /dev/null \ - || (bootstrap_wget) || return 1 + [[ ${OFFLINE_MODE} ]] \ + || [[ $(wget --version 2>&1) == *GNU" Wget "1.* ]] \ + || (bootstrap_wget) || return 1 # need wget-1, bug #953843 [[ -x ${ROOT}/tmp/usr/bin/sed ]] \ || [[ $(sed --version 2>&1) == *GNU* ]] \ || (bootstrap_sed) || return 1
