1 |
commit: fda55219e37e3fb4dcb7768802330907cc1af405 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 1 09:49:13 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 1 09:55:00 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=fda55219 |
7 |
|
8 |
scripts/bootstrap-prefix: rework efetch(ing) logic somewhat |
9 |
|
10 |
1) distfiles are in transitioning to hash-based subdir layout |
11 |
2) distfiles cannot be manually appended to any more |
12 |
|
13 |
To fix 1) use redirection service from distfiles.prefix.b.n to simply |
14 |
calculate the hash, so our existing calls will keep working. |
15 |
To fix 2) use same redirection service, but on /prefix url, that points |
16 |
to a local distfiles mirror for missing files, hopefully providing |
17 |
what's missing |
18 |
|
19 |
The order in efetch tries things now is a bit odd and long, but avoids |
20 |
using the redirection service: |
21 |
1) try GENTOO_MIRRORS provided hosts, or http://distfiles.g.o when unset |
22 |
2) try http://distfiles.prefix.b.n to redirect to distfiles (for when |
23 |
the hash approach becomes mandatory) |
24 |
3) try http://distfiles.prefix.b.n/prefix to redirect to prefix-local |
25 |
distfiles (using the same hash approach) |
26 |
4) try the original source location |
27 |
|
28 |
Bug: https://bugs.gentoo.org/726462 |
29 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
30 |
|
31 |
scripts/bootstrap-prefix.sh | 10 ++++++---- |
32 |
1 file changed, 6 insertions(+), 4 deletions(-) |
33 |
|
34 |
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh |
35 |
index 42f66eb9bb..4ca56caef4 100755 |
36 |
--- a/scripts/bootstrap-prefix.sh |
37 |
+++ b/scripts/bootstrap-prefix.sh |
38 |
@@ -70,7 +70,7 @@ efetch() { |
39 |
# try for mirrors first, fall back to distfiles, then try given location |
40 |
local locs=( ) |
41 |
local loc |
42 |
- for loc in ${GENTOO_MIRRORS} ; do |
43 |
+ for loc in ${GENTOO_MIRRORS} ${DISTFILES_G_O} ${DISTFILES_PFX}; do |
44 |
locs=( |
45 |
"${locs[@]}" |
46 |
"${loc}/distfiles/${1##*/}" |
47 |
@@ -579,7 +579,8 @@ do_tree() { |
48 |
# respect the source to get the latest |
49 |
if [[ -n ${LATEST_TREE_YES} ]] ; then |
50 |
echo "$1" |
51 |
- ( export GENTOO_MIRRORS= ; efetch "$1/$2" ) || return 1 |
52 |
+ ( export GENTOO_MIRRORS= DISTFILES_G_O= DISTFILES_PFX= ; |
53 |
+ efetch "$1/$2" ) || return 1 |
54 |
else |
55 |
efetch "$1/$2" || return 1 |
56 |
fi |
57 |
@@ -2104,8 +2105,9 @@ set_helper_vars() { |
58 |
PORTAGE_TMPDIR=${PORTAGE_TMPDIR:-${ROOT}/var/tmp} |
59 |
DISTFILES_URL=${DISTFILES_URL:-"http://dev.gentoo.org/~grobian/distfiles"} |
60 |
GNU_URL=${GNU_URL:="http://ftp.gnu.org/gnu"} |
61 |
- DISTFILES_G_O="http://distfiles.gentoo.org" |
62 |
- GENTOO_MIRRORS=${GENTOO_MIRRORS:=${DISTFILES_G_O}} |
63 |
+ DISTFILES_G_O="http://distfiles.prefix.gentoo.org" |
64 |
+ DISTFILES_PFX="http://distfiles.prefix.gentoo.org/prefix" |
65 |
+ GENTOO_MIRRORS=${GENTOO_MIRRORS:="http://distfiles.gentoo.org"} |
66 |
SNAPSHOT_HOST=$(rapx ${DISTFILES_G_O} http://rsync.prefix.bitzolder.nl) |
67 |
SNAPSHOT_URL=${SNAPSHOT_URL:-"${SNAPSHOT_HOST}/snapshots"} |
68 |
GCC_APPLE_URL="http://www.opensource.apple.com/darwinsource/tarballs/other" |