From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CnNTKTBzp2BPOQEAgWs5BA (envelope-from ) for ; Fri, 21 May 2021 10:45:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sCx3JDBzp2CSRgAA1q6Kng (envelope-from ) for ; Fri, 21 May 2021 08:45:36 +0000 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 331E716ACF for ; Fri, 21 May 2021 10:45:36 +0200 (CEST) Received: from localhost ([::1]:35078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lk0ml-0002OX-1C for larch@yhetil.org; Fri, 21 May 2021 04:45:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lk0Vo-0005yf-P9 for guix-patches@gnu.org; Fri, 21 May 2021 04:28:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lk0Vo-0005Q0-Gz for guix-patches@gnu.org; Fri, 21 May 2021 04:28:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lk0Vo-00062y-EO for guix-patches@gnu.org; Fri, 21 May 2021 04:28:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48560] [PATCH 4/4] scripts: substitute: Add keep-alive support when reading NAR. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 21 May 2021 08:28:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48560 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48560@debbugs.gnu.org Cc: Mathieu Othacehe X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162158565323164 (code B ref -1); Fri, 21 May 2021 08:28:04 +0000 Received: (at submit) by debbugs.gnu.org; 21 May 2021 08:27:33 +0000 Received: from localhost ([127.0.0.1]:35744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk0VI-00061S-LH for submit@debbugs.gnu.org; Fri, 21 May 2021 04:27:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:44376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk0VG-00061B-CB for submit@debbugs.gnu.org; Fri, 21 May 2021 04:27:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lk0VG-0005Jf-0W for guix-patches@gnu.org; Fri, 21 May 2021 04:27:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36140) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lk0VF-000542-PL for guix-patches@gnu.org; Fri, 21 May 2021 04:27:29 -0400 Received: from [2a01:e0a:19b:d9a0:f2f7:a404:c3d3:f8b4] (port=37126 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lk0VD-0003nM-Rv; Fri, 21 May 2021 04:27:28 -0400 From: Mathieu Othacehe Date: Fri, 21 May 2021 10:27:13 +0200 Message-Id: <20210521082713.20169-4-othacehe@gnu.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210521082713.20169-1-othacehe@gnu.org> References: <20210521082713.20169-1-othacehe@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621586736; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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; bh=NQdEkrtOfb2/UqK/DjiOySp8xQEmiADtV/jWRRIpeuw=; b=n4sYz6FE+s90PfyUYN+1oNNBt/Ji/4WdLKZo2HPMoh6CGMfF9Sx5Mvav3mXtSroBRVSBIA 0T3mPw7kRG8YhQP1F/Qqf6Cqn0e4IRg/Dx7wDUw/YBM117/eoWswOuQrsOiopsruK8KztP yA0X60ug321MmeWlbE3/+fvJzMiO3mquHlpykEexR+zvLBbQHaEt5LYEjRpH83Gxi+IZph ymWOepyo9zQUcbtf5CBTwlm8PfrxQegZr/iZxlkV4WDjLbIjOnc6FHEOc1BPXyIRi+ddy8 MTRrWot/oPl0Sqob/ip3h2MGtLKoXYsowBQL2pKFL7d/Pr9mA2H52zJfRmnICw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621586736; a=rsa-sha256; cv=none; b=Yo7nHWobtI1NFTReECWSG+0fxBpMcIUbl8+MgY7rBdyXqU4c88+x0e/oBguNnogpsrAPr8 O8HDTixavmz7RHjnWLY/s8+TQ0NJOqwG6mJsOx8NIjNT9lSJyzuvVo/Z79w/zVvIYQ8eqh zaQ0tnm2DYPhMun0P8GYzHiMZNHYOZBCKNh4/nI2Dwr+Dr/v1oIbE1mwAi7FhxdaP7V9OV 3Nd05bszCJgX8h78m0qjXAabm/XUQLapK+YLbeZSyTYabBbiO9snmw5DBwUgaWwkJSaJU3 ubXdP3gLD8F2UMP+mWFzuF9qImAF57tnYeO56SJOCL6RqD7NimgC19AWNpbu2A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.06 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 331E716ACF X-Spam-Score: 2.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: NM+EBpA6aL/Z * guix/scripts/substitute.scm (process-substitution): Pass the download size to the progress-report-port procedure so that it doesn't block reading from the input port when keep-alive is supported. --- guix/scripts/substitute.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 8e4eae00b3..54311c3e08 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -518,8 +518,11 @@ PORT." (current-error-port) #:abbreviation nar-uri-abbreviation)))) ;; Keep RAW open upon completion so we can later reuse - ;; the underlying connection. - (progress-report-port reporter raw #:close? #f))) + ;; the underlying connection. Pass the download size so + ;; that this procedure won't block reading from RAW. + (progress-report-port reporter raw + #:close? #f + #:download-size dl-size))) ((input pids) ;; NOTE: This 'progress' port of current process will be ;; closed here, while the child process doing the -- 2.31.1