From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 6FdRBXCOa2T9AQAASxT56A (envelope-from ) for ; Mon, 22 May 2023 17:46:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OO8FBXCOa2SiGgAAauVa8A (envelope-from ) for ; Mon, 22 May 2023 17:46:56 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C103C17A62 for ; Mon, 22 May 2023 17:46:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q17jv-000447-AK; Mon, 22 May 2023 11:46:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q17jW-0003x3-Rw for guix-patches@gnu.org; Mon, 22 May 2023 11:46:16 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q17jW-0004Yu-Jl for guix-patches@gnu.org; Mon, 22 May 2023 11:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q17jW-0005HC-1h for guix-patches@gnu.org; Mon, 22 May 2023 11:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63646] [PATCH] substitute: If a server's nar URL is 404, try the next one(s). Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 May 2023 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63646 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63646@debbugs.gnu.org Cc: Josselin Poiret , Tobias Geerinckx-Rice , Simon Tournier , Mathieu Othacehe , Christopher Baines , Ricardo Wurmus Received: via spool by 63646-submit@debbugs.gnu.org id=B63646.168477034020249 (code B ref 63646); Mon, 22 May 2023 15:46:02 +0000 Received: (at 63646) by debbugs.gnu.org; 22 May 2023 15:45:40 +0000 Received: from localhost ([127.0.0.1]:35994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q17j9-0005GX-TU for submit@debbugs.gnu.org; Mon, 22 May 2023 11:45:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q17j7-0005GJ-Q8 for 63646@debbugs.gnu.org; Mon, 22 May 2023 11:45:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q17j0-0004Ss-Lv; Mon, 22 May 2023 11:45:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=jNGDR7jAhZT1/H2LdJMZCjKtyNMIxzu14LgJZEUFzmw=; b=QOtBR7v20b/OdOKJaOtL eUQrtowVRm4UPSvX5j8bew3Lx1TdY8cbfJoXBYt01uirqBdDM79SFp9e7Rr2YJCqVljR7+QnHB6c9 kwokEspHARbPF8i3Jeyz06liWeZKhIbeU+Br0+7Zco3DcAWh3RuEidyCUaNfV6UNyyy6Lp3h+NzT2 HNAgDeSibRt8E3x+Dipx0W0nkXl3h6yYOSXN8lX8pIoX9YmmLDcsFkaErySrC+H6AYwetmBJ/1wyj iYRc+R7fxUNBUvK8TBN/qeW8l5/hrGlnXtiaAQreNAcjgMR66Wq+regBv1rMyIfZwDdpHuNw+qf5w 7R8adxxXeu1bvA==; Received: from [193.50.110.247] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q17j0-0002kE-7L; Mon, 22 May 2023 11:45:30 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Mon, 22 May 2023 17:45:27 +0200 In-Reply-To: ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 22 May 2023 17:30:50 +0200") Message-ID: <87v8gkv088.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684770416; a=rsa-sha256; cv=none; b=BsX9JoxC4Zg8gVC1YOwFYuC1Yla0LzE72XC79IS6WOqIVfwsJKfi0NKW0r0kkqfxzT/nU3 uiHKBkW7WjlawmBh0SXXH3+BlUI1SXfU6QOfoMfnUAutljppXsEk2yyeLtJJLE4M+fNMXE rd+ZVIq9zFf+WGggoHCoYoJF5hgHlg6SwYaF8IFIdYAVl8aglMXcVLTPyAx8SQ7qg0oRHn dSvj1yNGCCYEtZmvecUR/tM3DbbH7TS2ujxOLS3CDr3pWN3aVg20vap+lC5/ZguZulVIVL y4y12JIWXkAqZK+gWvKNUHpgjos3L9winx0xEmIrlfrQTosJNgoqVB5EPYG7SQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=QOtBR7v2; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684770416; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=jNGDR7jAhZT1/H2LdJMZCjKtyNMIxzu14LgJZEUFzmw=; b=opYZWRZpc+foN9UPSxS+U0edg9Z/mXhQblRHhVEdRRTgmXibqX7Ey2mtO2iRl1ALlXoQvh GYSnSUmkZltuaWXwsDAmuCOQ1yd7/yLU+S4XDDohphtayHX1DV0AelzPsZXU6r6r1u9z4d dREEu8ezaEekfa1SQa/x69X4rqKvlAWK0TvD5HL3qGWiNL1AltuR5MeXfJJiLZpRcCi3h1 My6lJNp2YcZgzxKHa2B4r6NFMHjnK93HhWrjWPYMvi736wr51xey2Mr7GNGGzaa++wlcFA P++1rs8Y7lan0s1H2msGSQvyh8LhAJ3eYrQueOoYYsAZXJnzqK1BCRRr+4hxIg== X-Migadu-Spam-Score: -2.41 X-Spam-Score: -2.41 X-Migadu-Queue-Id: C103C17A62 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=QOtBR7v2; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-TUID: lnN+svrf88Eu Ludovic Court=C3=A8s skribis: > + (define (try-fetch choices) > + (match choices > + (((uri compression file-size) rest ...) > + (guard (c ((and (pair? rest) (network-error? c)) > + (warning (G_ "download from '~a' failed, trying next U= RL~%") > + (uri->string uri)) I realized we can change =E2=80=98network-error?=E2=80=99 to =E2=80=98http-= get-error?=E2=80=99 above. Otherwise, we could find ourselves trying several nar URLs on the same server when the error is ETIMEDOUT or ECONNREFUSED, which would be a waste of time. Ludo=E2=80=99.