~alpine/devel

setup-apkrepos: fix detect fastest mirror - fixes #6683 v1 PROPOSED

: 1
 setup-apkrepos: fix detect fastest mirror - fixes #6683

 1 files changed, 3 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/devel/patches/983/mbox | git am -3
Learn more about email & git

[alpine-devel] [PATCH] setup-apkrepos: fix detect fastest mirror - fixes #6683 Export this patch

From: Leonardo Arena <rnalrd@gmail.com>

---
 setup-apkrepos.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/setup-apkrepos.in b/setup-apkrepos.in
index 4565852..f4d4709 100644
--- a/setup-apkrepos.in
+++ b/setup-apkrepos.in
@@ -51,7 +51,7 @@ find_fastest_mirror() {
	for url in $MIRRORS; do
		# warm up the dns cache
		nslookup $(get_hostname_from_url $url) >/dev/null 2>&1
		local time=$(time_cmd wget -q -s -T 5 \
		local time=$(time_cmd wget -q -S -T 5 \
			${url%/}/edge/main/$arch/APKINDEX.tar.gz)
		if [ -n "$time" ]; then
			echo "$time $url"
@@ -204,6 +204,8 @@ if [ -n "$JUSTADDRANDOM" ]; then
fi

if [ -n "$JUSTADDFASTEST" ]; then
	# need GNU wget
	apk add wget --quiet
	show_mirror_list > /dev/null
	add_fastest_mirror && changed=true
fi
-- 
2.7.4



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---