X-Original-To: alpine-devel@lists.alpinelinux.org Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by lists.alpinelinux.org (Postfix) with ESMTP id 56C5A5C4972 for ; Tue, 24 Jan 2017 16:10:48 +0000 (GMT) Received: by mail-wm0-f53.google.com with SMTP id r144so216698547wme.1 for ; Tue, 24 Jan 2017 08:10:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version; bh=xgapqkUozh+Wvu0S2tz8NpdhtuZArwf/LR/FPHbILY0=; b=HfB34CyqmiTInDNR4zOND2ejmrBGHoGrCNa9J74l+b2MU/Zxv98ZkaoDOSkmdrbbWU Ga/9tCxyZjCBU9qaQUB+VzTOzb9j2klGBCTvuTZHuMKKeEVLHqh9oUoyozp4r6bnfoPy onve4g+KwxhWYr7F6SQk9YFKj/Za7KV25CcyFKHhf/za4iHvr+bKXIath3fiY+wgFntn SwXBCiPn4yDiLZky7XjmCpJEVrRKuirtsCri7Uhz6fQIBfQwu01z6RdOgiTqNuC6W6Za Sbj66YUke0O32YMyBfQazVBnFMVH50Y2pjn6Mf1S0w0O8N2P1loht6RYrKOL13Ppp3TV Lt/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version; bh=xgapqkUozh+Wvu0S2tz8NpdhtuZArwf/LR/FPHbILY0=; b=DzCryEGyF+ZBylKdRUs6KFkQma+C9VONfBMnG1tK/U/y4oRN8rHq1H2CJwMa/kHLQG Oais2A17pmakH5uIcI1jMzc9SAPlkdrvuXFVTstF9/AAx5c6immkAPlMSXmmzuMF7N++ 9QwaTxuu03CF006ptTFYQdsn0ZmgjwL7DPYrGaBUc1VIxVL87rLn5TentdxNHXLdHcn/ IrJ0HVg9DfV6/yIDhg8x3JPqBRTAKRjer3onDNEhnD7CiXS23mkiwBYwsFrlRn7tYe+e SHeuck4ddMdM1hFxwXNBSSuuzzU26WaR7Sn/mEEfyDtTFEjjefCE/AL32SmOqdU+lvTg SMIQ== X-Gm-Message-State: AIkVDXLDlQQdvSNK1VX6mNjiq+PRw5jeqA6Pfd82HmtCUck0aXEAPavXW88hnPVjxix/+w== X-Received: by 10.28.103.3 with SMTP id b3mr17560946wmc.99.1485274247634; Tue, 24 Jan 2017 08:10:47 -0800 (PST) Received: from df1844j.local ([89.202.239.221]) by smtp.googlemail.com with ESMTPSA id o42sm20611294wrb.18.2017.01.24.08.10.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 08:10:46 -0800 (PST) Message-ID: <1485274245.11710.44.camel@gmail.com> Subject: Re: [alpine-devel] [PATCH] setup-apkrepos: fix detect fastest mirror - fixes #6683 From: Leonardo Arena To: Natanael Copa Cc: alpine-devel@lists.alpinelinux.org Date: Tue, 24 Jan 2017 17:10:45 +0100 In-Reply-To: <20170124165812.685f5714@ncopa-desktop.copa.dup.pw> References: <1485272345-14166-1-git-send-email-rnalrd@gmail.com> <20170124165812.685f5714@ncopa-desktop.copa.dup.pw> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-amNH7jsB/ugtt979qBw9" X-Mailer: Evolution 3.18.5.2-0ubuntu3.1 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 --=-amNH7jsB/ugtt979qBw9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On mar, 2017-01-24 at 16:58 +0100, Natanael Copa wrote: > On Tue, 24 Jan 2017 16:39:05 +0100 > rnalrd@gmail.com wrote: >=20 > >=20 > > From: Leonardo Arena > >=20 > > --- > > =C2=A0setup-apkrepos.in | 4 +++- > > =C2=A01 file changed, 3 insertions(+), 1 deletion(-) > >=20 > > 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() { > > =C2=A0 for url in $MIRRORS; do > > =C2=A0 # warm up the dns cache > > =C2=A0 nslookup $(get_hostname_from_url $url) >/dev/null > > 2>&1 > > - local time=3D$(time_cmd wget -q -s -T 5 \ > > + local time=3D$(time_cmd wget -q -S -T 5 \ > > =C2=A0 ${url%/}/edge/main/$arch/APKINDEX.tar.gz) > > =C2=A0 if [ -n "$time" ]; then > > =C2=A0 echo "$time $url" > > @@ -204,6 +204,8 @@ if [ -n "$JUSTADDRANDOM" ]; then > > =C2=A0fi > > =C2=A0 > > =C2=A0if [ -n "$JUSTADDFASTEST" ]; then > > + # need GNU wget > > + apk add wget --quiet > > =C2=A0 show_mirror_list > /dev/null > > =C2=A0 add_fastest_mirror && changed=3Dtrue > > =C2=A0fi > I dont think we should pull in gnu wget since we then would need to > have it on the iso. >=20 > I think there is a wget --spider option that should work for busybox > too. >=20 > https://git.busybox.net/busybox/commit/?id=3D2972e2c4acb9c46a8cc05c857a > cac2b3d439bf69 >=20 > -nc Well, edge still has 1.26. So I did it with what was available :) Nice option though! Thanks -|_eo --=-amNH7jsB/ugtt979qBw9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJYh3yFAAoJELAPckZGG2T6uQcH/1TKAaEV/YlTXRXECJhpOA7B soa/v/6hTieYv2hHqzNb45wYatk5Q7nOUocAYMq9tE2qffbvGnU3xGeG+K758ybg RChJU63ZfmTruuqqadA7PSa7c0m7CxWwzo+d8P43PXVRpVPtcoUbIVtii47/ANmP WuM0SuhnQ0HRrvKJvWJSJV+rm/chvkKqd6LNaZn5eK0gstVgmsyDNqTcEnFhfCp7 TznfHLqvSm9rV6DPNQqzn4egsYE38GiUHhcaz861Q1Ojx5yOWhijsOOKI8f8hmUz qVpHrorwqE3OiugJMu6Bh9meFUJ5svkYKLYMiSbZ86RjDv0yPr6+tcMb/f6ErDY= =fojz -----END PGP SIGNATURE----- --=-amNH7jsB/ugtt979qBw9-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---