aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2024-02-23 14:20:41 +0100
committerLudovic Courtès <ludo@gnu.org>2024-03-09 18:55:50 +0100
commit3e9bea7ee30a3425011afb8e2f70b7a8fe6a404b (patch)
treec836bd57ce65e3ee8847cd7c135e5ace83156267 /guix
parent8a42fc71401fce2086111f5d319aeeddf202513a (diff)
downloadguix-3e9bea7ee30a3425011afb8e2f70b7a8fe6a404b.tar
guix-3e9bea7ee30a3425011afb8e2f70b7a8fe6a404b.tar.gz
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
Diffstat (limited to 'guix')
-rw-r--r--guix/build/download-nar.scm12
1 files 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))))
(()