[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/12: download-nar: Distinguish ‘output’ and ‘item’ parameter.
From: |
guix-commits |
Subject: |
10/12: download-nar: Distinguish ‘output’ and ‘item’ parameter. |
Date: |
Sat, 9 Mar 2024 13:49:07 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 3e9bea7ee30a3425011afb8e2f70b7a8fe6a404b
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Feb 23 14:20:41 2024 +0100
download-nar: Distinguish ‘output’ and ‘item’ parameter.
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 <ludo@gnu.org>
+;;; Copyright © 2017, 2019, 2020, 2024 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,9 +57,9 @@ ITEM."
(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 @@ success, #f otherwise."
#: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))))
(()
- branch master updated (d53ca79370 -> 2f441fc738), guix-commits, 2024/03/09
- 09/12: bzr-download: Implement nar fallback., guix-commits, 2024/03/09
- 12/12: download: Honor ‘GUIX_DOWNLOAD_METHODS’ environment variable., guix-commits, 2024/03/09
- 01/12: lint: Switch to SRFI-71., guix-commits, 2024/03/09
- 04/12: swh: Add ‘type’ field to <visit>., guix-commits, 2024/03/09
- 07/12: hg-download: Use ‘swh-download-directory-by-nar-hash’., guix-commits, 2024/03/09
- 10/12: download-nar: Distinguish ‘output’ and ‘item’ parameter.,
guix-commits <=
- 06/12: swh: ‘lookup-origin-revision’ handles branches pointing to directories., guix-commits, 2024/03/09
- 02/12: lint: archival: Fix crash in non-Git case., guix-commits, 2024/03/09
- 08/12: svn-download: Use ‘swh-download-directory-by-nar-hash’., guix-commits, 2024/03/09
- 05/12: swh: ‘origin-visits’ takes an optional ‘max’ parameter., guix-commits, 2024/03/09
- 03/12: lint: archival: Trigger “Save Code Now” for VCSes other than Git., guix-commits, 2024/03/09
- 11/12: perform-download: Allow use of ‘download-nar’ for ‘--check’ builds., guix-commits, 2024/03/09