aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-conf/0001-setup-apkrepos-fix-speed-test-of-mirrors.patch
blob: 3ca7be609e2ed22a4995b5f52c26cf750a5db461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 2a97a54f983f16aaea7d9ef77023d32ddcf8b6c7 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 16 Jun 2015 10:31:14 +0200
Subject: [PATCH] setup-apkrepos: fix speed test of mirrors

Some mirrors error on double / in path.

ref #4365
---
 setup-apkrepos.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup-apkrepos.in b/setup-apkrepos.in
index 1956b19..1bbccca 100644
--- a/setup-apkrepos.in
+++ b/setup-apkrepos.in
@@ -48,7 +48,7 @@ find_fastest_mirror() {
 	local url=
 	for url in $MIRRORS; do
 		local time=$(time_cmd apk update --quiet $apk_root_opt \
-				--repository $url/edge/main \
+				--repository ${url%/}/edge/main \
 				--repositories-file /dev/null)
 		if [ -n "$time" ]; then
 			echo "$time $url"
-- 
2.4.5