From patchwork Tue Mar 16 23:46:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 27889 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 916E727BC55; Tue, 16 Mar 2021 23:48:04 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 30F5A27BC54 for ; Tue, 16 Mar 2021 23:48:04 +0000 (GMT) Received: from localhost ([::1]:56800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMJPv-0001Z3-F1 for patchwork@mira.cbaines.net; Tue, 16 Mar 2021 19:48:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMJOw-0000jv-Ei for guix-patches@gnu.org; Tue, 16 Mar 2021 19:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMJOw-0005zi-7S for guix-patches@gnu.org; Tue, 16 Mar 2021 19:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lMJOw-0007Y3-3X for guix-patches@gnu.org; Tue, 16 Mar 2021 19:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47160] [PATCH 2/2] scripts: substitute: Tweak error reporting in process-substitution. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Mar 2021 23:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47160 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47160@debbugs.gnu.org Received: via spool by 47160-submit@debbugs.gnu.org id=B47160.161593839128967 (code B ref 47160); Tue, 16 Mar 2021 23:47:02 +0000 Received: (at 47160) by debbugs.gnu.org; 16 Mar 2021 23:46:31 +0000 Received: from localhost ([127.0.0.1]:41463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMJOR-0007X8-5M for submit@debbugs.gnu.org; Tue, 16 Mar 2021 19:46:31 -0400 Received: from mira.cbaines.net ([212.71.252.8]:33880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMJOP-0007Wx-8s for 47160@debbugs.gnu.org; Tue, 16 Mar 2021 19:46:29 -0400 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id C635F27BC55 for <47160@debbugs.gnu.org>; Tue, 16 Mar 2021 23:46:28 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 6da438fe for <47160@debbugs.gnu.org>; Tue, 16 Mar 2021 23:46:28 +0000 (UTC) From: Christopher Baines Date: Tue, 16 Mar 2021 23:46:28 +0000 Message-Id: <20210316234628.24479-2-mail@cbaines.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210316234628.24479-1-mail@cbaines.net> References: <20210316234628.24479-1-mail@cbaines.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches The call-with-connection-error-handling was added in 20c08a8a45d0f137ead7c05e720456b2aea44402, but that error handling was previously inside of open-connection-for-uri/maybe, which is related to (call-)with-cached-connection which was used in process-substitution, but only actually used with call-with-cached-connection when used in fetch-narinfos. There's some handling for similar errors within with-networking, which is used within process-substitution. * guix/scripts/substitute.scm (process-substitution): Remove call-with-connection-error-handling call. --- guix/scripts/substitute.scm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 812f2999ab..2bbbafe204 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -448,14 +448,11 @@ the current output port." (warning (G_ "while fetching ~a: server is somewhat slow~%") (uri->string uri)) (warning (G_ "try `--no-substitutes' if the problem persists~%"))) - (call-with-connection-error-handling - uri - (lambda () - (with-cached-connection uri port - (http-fetch uri #:text? #f - #:port port - #:keep-alive? #t - #:buffered? #f))))))) + (with-cached-connection uri port + (http-fetch uri #:text? #f + #:port port + #:keep-alive? #t + #:buffered? #f))))) (else (leave (G_ "unsupported substitute URI scheme: ~a~%") (uri->string uri)))))