X-Original-To: alpine-devel@lists.alpinelinux.org Received: from newmail.tetrasec.net (unknown [172.21.74.12]) by lists.alpinelinux.org (Postfix) with ESMTP id C881F5C41E8 for ; Tue, 24 Jan 2017 15:58:16 +0000 (GMT) Received: from ncopa-desktop.copa.dup.pw (15.63.200.37.customer.cdi.no [37.200.63.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by newmail.tetrasec.net (Postfix) with ESMTPSA id 2747E5A122D; Tue, 24 Jan 2017 15:58:15 +0000 (GMT) Date: Tue, 24 Jan 2017 16:58:12 +0100 From: Natanael Copa To: rnalrd@gmail.com Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [PATCH] setup-apkrepos: fix detect fastest mirror - fixes #6683 Message-ID: <20170124165812.685f5714@ncopa-desktop.copa.dup.pw> In-Reply-To: <1485272345-14166-1-git-send-email-rnalrd@gmail.com> References: <1485272345-14166-1-git-send-email-rnalrd@gmail.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.28; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 24 Jan 2017 16:39:05 +0100 rnalrd@gmail.com wrote: > From: Leonardo Arena > > --- > 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 I dont think we should pull in gnu wget since we then would need to have it on the iso. I think there is a wget --spider option that should work for busybox too. https://git.busybox.net/busybox/commit/?id=2972e2c4acb9c46a8cc05c857acac2b3d439bf69 -nc --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---