From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id QFp8Am/95mXe4gAAe85BDQ:P1 (envelope-from ) for ; Tue, 05 Mar 2024 12:09:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id QFp8Am/95mXe4gAAe85BDQ (envelope-from ) for ; Tue, 05 Mar 2024 12:09:35 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Ic2LOc+f; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709636974; 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=r1S7QRxOSIfz/tH9fyNFWCjkYdbX+9xm2B1kmVqebQ0=; b=YmMlbIHbA7x25418avFcHjwbG3e/uU5GVJSHnnQlSZyb4v9NYmygMgDwKmJY2/44uWqE0k B2204JrQRylpoTjAuMRFcwAatNTyVNjJMSsd0M8XcNGDVj/YFrDQ7nwV8s6L/hBI5ZX0pP 99IwNkR7MGAJuJt44ZjR7fFrRd9j2aObKM5h/CwYoXzQUWtyNRp+CCyHGBKM86GljJeOiz Ypy1BALlZLAXsjQyOLchzkwRMIVLxvEcXMhpWTHA6wa2ZjH3B/lKbdTMWOtlaNya+eNWJg cTltnObRztO/eUwVRGzHfh14f+M7AjKTWaAXGwmSopTVbFlXq1UB/y1NrNPcPw== 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=Ic2LOc+f; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709636974; a=rsa-sha256; cv=none; b=q7MWhnx5LM9+Kd8hxUZJD5zqvgxGJjjJCuHQewmXnwX8NlqSJlNBEzAB7jjRmQ6WXD7gKD Z+dFyIpFgO9fKfpHXIoKiIxrPea1eWdcH3ufHj0qqJAmNbolvgppPWm7rdKQw0ZlcsbJJG ryvHvaDBWnnl0vnSo2g2EnGNyLTNJQxxJvHR5+VP+x5zDGLxSz31hHrNlkelTb/ZeD9SCJ dnXuwmjkImyM+phC1gxP+AezTIMXjebYXCHNckrEJfEYZYWQ5b9EeVWDYqiQZzqtvGpZ/a 4EqLtBjDzxDQhm6+idfyXlx09OmwvGAIjF00TVUUE6R/5G2G33amkmFPDiwvRQ== 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 D78E422C8F for ; Tue, 5 Mar 2024 12:09:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhSfR-0004I9-29; Tue, 05 Mar 2024 06:09:08 -0500 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 1rhSeu-00045I-P9 for guix-patches@gnu.org; Tue, 05 Mar 2024 06:08:38 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhSeu-0003Ju-FC for guix-patches@gnu.org; Tue, 05 Mar 2024 06:08:32 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rhSfO-0000BC-Hm for guix-patches@gnu.org; Tue, 05 Mar 2024 06:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69328] [PATCH v2 10/12] download-nar: Distinguish =?UTF-8?Q?=E2=80=98output=E2=80=99?= and =?UTF-8?Q?=E2=80=98item=E2=80=99?= parameter. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 Mar 2024 11:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69328 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69328@debbugs.gnu.org Cc: Timothy Sample , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 69328-submit@debbugs.gnu.org id=B69328.1709636895601 (code B ref 69328); Tue, 05 Mar 2024 11:09:02 +0000 Received: (at 69328) by debbugs.gnu.org; 5 Mar 2024 11:08:15 +0000 Received: from localhost ([127.0.0.1]:46471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhSed-00009X-5B for submit@debbugs.gnu.org; Tue, 05 Mar 2024 06:08:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhSeN-00005N-3b for 69328@debbugs.gnu.org; Tue, 05 Mar 2024 06:07:59 -0500 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 1rhSdn-0002xt-Gw; Tue, 05 Mar 2024 06:07:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=r1S7QRxOSIfz/tH9fyNFWCjkYdbX+9xm2B1kmVqebQ0=; b=Ic2LOc+fLaKQFgyBrX9b s4nGiQ3D5sU7eLMm9LNL5Jdth2o0Vzr3AxmnTiGEmrSNvQVlpL1z1itSpeUN0Pd8wEwDNEtOYlYAt k6a7ZQU4JJmsYiMAdmASfuQNbr9ZT5CMaeJO6+ChPbw5FR2or9iKG2/IO7AXS/tlycFPUzvxX93E8 x6fABvQYew6Jig2GlHSrTQ2XxWvbr5Byjz0OY2Aeb9oUX6vKOJNgF27HdSQxmHlbzLJYA1xqAXXvH Sg/Z9rfRGcoMWGSatYLdmVHLqpCfXQbjTCcrdzbzGK+bMfBdg5pvkz2tZGfa8pmz8AD76a+GGLNw2 4mBIBWoE3+l1LQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Tue, 5 Mar 2024 12:06:58 +0100 Message-ID: <559b047af3adb608ef8245faadb0c7089dd2de1a.1709636144.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <87o7btc5du.fsf@gnu.org> References: <87o7btc5du.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -4.31 X-Spam-Score: -4.31 X-Migadu-Queue-Id: D78E422C8F X-TUID: lYjl7N9wUGEr This is useful when running a ‘--check’ build, where the output file name differs from the store file name we are trying to restore. * guix/build/download-nar.scm (download-nar): Add ‘output’ parameter and distinguish it from ‘item’. Change-Id: I42219b6d4c8fd1ed506720301384efc1aa351561 --- guix/build/download-nar.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/guix/build/download-nar.scm b/guix/build/download-nar.scm index 3ba121b7fb..f26ad28cd0 100644 --- a/guix/build/download-nar.scm +++ b/guix/build/download-nar.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017, 2019, 2020 Ludovic Courtès +;;; Copyright © 2017, 2019, 2020, 2024 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,9 +57,9 @@ (define (restore-lzipped-nar port item size) (restore-file decompressed-port item)))) -(define (download-nar item) - "Download and extract the normalized archive for ITEM. Return #t on -success, #f otherwise." +(define* (download-nar item #:optional (output item)) + "Download and extract to OUTPUT the normalized archive for ITEM, a store +item. Return #t on success, #f otherwise." ;; Let progress reports go through. (setvbuf (current-error-port) 'none) (setvbuf (current-output-port) 'none) @@ -96,10 +96,10 @@ (define (download-nar item) #:download-size size))) (if (string-contains url "/lzip") (restore-lzipped-nar port-with-progress - item + output size) (restore-file port-with-progress - item))) + output))) (newline) #t)))) (() -- 2.41.0