[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#65866] [PATCH v2 3/8] perform-download: Remove unused one-argument
From: |
Ludovic Courtès |
Subject: |
[bug#65866] [PATCH v2 3/8] perform-download: Remove unused one-argument clause. |
Date: |
Sat, 23 Sep 2023 00:27:59 +0200 |
Code in ‘builtins.cc’ only ever invokes ‘guix perform-download’ with two
arguments.
* guix/scripts/perform-download.scm (guix-perform-download): Remove
unused one-argument clause.
(perform-download): Make ‘output’ parameter mandatory; remove ‘output*’
variable.
---
guix/scripts/perform-download.scm | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/guix/scripts/perform-download.scm
b/guix/scripts/perform-download.scm
index 6889bcef79..3b29a3c81d 100644
--- a/guix/scripts/perform-download.scm
+++ b/guix/scripts/perform-download.scm
@@ -42,16 +42,14 @@ (define %user-module
(module-use! module (resolve-interface '(guix base32)))
module))
-(define* (perform-download drv #:optional output
+(define* (perform-download drv output
#:key print-build-trace?)
"Perform the download described by DRV, a fixed-output derivation, to
OUTPUT.
-Note: Unless OUTPUT is #f, we don't read the value of 'out' in DRV since the
-actual output is different from that when we're doing a 'bmCheck' or
-'bmRepair' build."
+Note: OUTPUT may differ from the 'out' value of DRV, notably for 'bmCheck' or
+'bmRepair' builds."
(derivation-let drv ((url "url")
- (output* "out")
(executable "executable")
(mirrors "mirrors")
(content-addressed-mirrors "content-addressed-mirrors")
@@ -59,8 +57,7 @@ (define* (perform-download drv #:optional output
(unless url
(leave (G_ "~a: missing URL~%") (derivation-file-name drv)))
- (let* ((output (or output output*))
- (url (call-with-input-string url read))
+ (let* ((url (call-with-input-string url read))
(drv-output (assoc-ref (derivation-outputs drv) "out"))
(algo (derivation-output-hash-algo drv-output))
(hash (derivation-output-hash drv-output)))
@@ -120,13 +117,8 @@ (define-command (guix-perform-download . args)
(match args
(((? derivation-path? drv) (? store-path? output))
(assert-low-privileges)
- (perform-download (read-derivation-from-file drv)
- output
- #:print-build-trace? print-build-trace?))
- (((? derivation-path? drv)) ;backward compatibility
- (assert-low-privileges)
- (perform-download (read-derivation-from-file drv)
- #:print-build-trace? print-build-trace?))
+ (let ((drv (read-derivation-from-file drv)))
+ (perform-download drv output #:print-build-trace?
print-build-trace?)))
(("--version")
(show-version-and-exit))
(x
--
2.41.0
- [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts, Ludovic Courtès, 2023/09/11
- [bug#65866] [PATCH 4/8] daemon: Add “git-download” built-in builder., Ludovic Courtès, 2023/09/11
- [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts, Maxim Cournoyer, 2023/09/20
- [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts, Ludovic Courtès, 2023/09/21
- [bug#65866] [PATCH v2 0/8] Add built-in builder for Git checkouts, Ludovic Courtès, 2023/09/22
- [bug#65866] [PATCH v2 1/8] git-download: Move fallback code to (guix build git)., Ludovic Courtès, 2023/09/22
- [bug#65866] [PATCH v2 1/8] git-download: Move fallback code to (guix build git)., Simon Tournier, 2023/09/25
- [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts, Ludovic Courtès, 2023/09/25
- [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts, Simon Tournier, 2023/09/25
- [bug#65866] [PATCH v2 3/8] perform-download: Remove unused one-argument clause.,
Ludovic Courtès <=
- [bug#65866] [PATCH v2 2/8] git-download: Honor the ‘GUIX_DOWNLOAD_FALLBACK_TEST’ environment variable., Ludovic Courtès, 2023/09/22
- [bug#65866] [PATCH v2 8/8] tests: Assume ‘git’ is always available., Ludovic Courtès, 2023/09/22
- [bug#65866] [PATCH v2 6/8] perform-download: Use the ‘git’ command captured at configure time., Ludovic Courtès, 2023/09/22
- [bug#65866] [PATCH v2 4/8] daemon: Add “git-download” built-in builder., Ludovic Courtès, 2023/09/22
- [bug#65866] [PATCH v2 7/8] git-download: Use “builtin:git-download” when available., Ludovic Courtès, 2023/09/22
- [bug#65866] [PATCH v2 7/8] git-download: Use “builtin:git-download” when available., Simon Tournier, 2023/09/25
- [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts, Ludovic Courtès, 2023/09/25
- [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts, Simon Tournier, 2023/09/25
- [bug#65866] [PATCH 0/8] Add built-in builder for Git checkouts, Maxim Cournoyer, 2023/09/25
- bug#65866: [PATCH 0/8] Add built-in builder for Git checkouts, Ludovic Courtès, 2023/09/26