From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EBDE11382C5 for ; Mon, 1 Jun 2020 09:55:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F04FBE08FB; Mon, 1 Jun 2020 09:55:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C2CB8E08FB for ; Mon, 1 Jun 2020 09:55:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3299334E590 for ; Mon, 1 Jun 2020 09:55:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AA84F242 for ; Mon, 1 Jun 2020 09:55:19 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1591005300.fda55219e37e3fb4dcb7768802330907cc1af405.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: fda55219e37e3fb4dcb7768802330907cc1af405 X-VCS-Branch: master Date: Mon, 1 Jun 2020 09:55:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 91d281d0-5850-46fe-85ef-267df1e9460b X-Archives-Hash: 8a236683fff8ae7fabc1b190b8221a42 commit: fda55219e37e3fb4dcb7768802330907cc1af405 Author: Fabian Groffen gentoo org> AuthorDate: Mon Jun 1 09:49:13 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Mon Jun 1 09:55:00 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=fda55219 scripts/bootstrap-prefix: rework efetch(ing) logic somewhat 1) distfiles are in transitioning to hash-based subdir layout 2) distfiles cannot be manually appended to any more To fix 1) use redirection service from distfiles.prefix.b.n to simply calculate the hash, so our existing calls will keep working. To fix 2) use same redirection service, but on /prefix url, that points to a local distfiles mirror for missing files, hopefully providing what's missing The order in efetch tries things now is a bit odd and long, but avoids using the redirection service: 1) try GENTOO_MIRRORS provided hosts, or http://distfiles.g.o when unset 2) try http://distfiles.prefix.b.n to redirect to distfiles (for when the hash approach becomes mandatory) 3) try http://distfiles.prefix.b.n/prefix to redirect to prefix-local distfiles (using the same hash approach) 4) try the original source location Bug: https://bugs.gentoo.org/726462 Signed-off-by: Fabian Groffen 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 42f66eb9bb..4ca56caef4 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -70,7 +70,7 @@ efetch() { # try for mirrors first, fall back to distfiles, then try given location local locs=( ) local loc - for loc in ${GENTOO_MIRRORS} ; do + for loc in ${GENTOO_MIRRORS} ${DISTFILES_G_O} ${DISTFILES_PFX}; do locs=( "${locs[@]}" "${loc}/distfiles/${1##*/}" @@ -579,7 +579,8 @@ do_tree() { # respect the source to get the latest if [[ -n ${LATEST_TREE_YES} ]] ; then echo "$1" - ( export GENTOO_MIRRORS= ; efetch "$1/$2" ) || return 1 + ( export GENTOO_MIRRORS= DISTFILES_G_O= DISTFILES_PFX= ; + efetch "$1/$2" ) || return 1 else efetch "$1/$2" || return 1 fi @@ -2104,8 +2105,9 @@ set_helper_vars() { PORTAGE_TMPDIR=${PORTAGE_TMPDIR:-${ROOT}/var/tmp} DISTFILES_URL=${DISTFILES_URL:-"http://dev.gentoo.org/~grobian/distfiles"} GNU_URL=${GNU_URL:="http://ftp.gnu.org/gnu"} - DISTFILES_G_O="http://distfiles.gentoo.org" - GENTOO_MIRRORS=${GENTOO_MIRRORS:=${DISTFILES_G_O}} + DISTFILES_G_O="http://distfiles.prefix.gentoo.org" + DISTFILES_PFX="http://distfiles.prefix.gentoo.org/prefix" + GENTOO_MIRRORS=${GENTOO_MIRRORS:="http://distfiles.gentoo.org"} SNAPSHOT_HOST=$(rapx ${DISTFILES_G_O} http://rsync.prefix.bitzolder.nl) SNAPSHOT_URL=${SNAPSHOT_URL:-"${SNAPSHOT_HOST}/snapshots"} GCC_APPLE_URL="http://www.opensource.apple.com/darwinsource/tarballs/other"