perform-download: Remove unused one-argument clause.
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.
parent
c7ed1e0160
commit
9d0e2002a5
|
@ -42,16 +42,14 @@
|
||||||
(module-use! module (resolve-interface '(guix base32)))
|
(module-use! module (resolve-interface '(guix base32)))
|
||||||
module))
|
module))
|
||||||
|
|
||||||
(define* (perform-download drv #:optional output
|
(define* (perform-download drv output
|
||||||
#:key print-build-trace?)
|
#:key print-build-trace?)
|
||||||
"Perform the download described by DRV, a fixed-output derivation, to
|
"Perform the download described by DRV, a fixed-output derivation, to
|
||||||
OUTPUT.
|
OUTPUT.
|
||||||
|
|
||||||
Note: Unless OUTPUT is #f, we don't read the value of 'out' in DRV since the
|
Note: OUTPUT may differ from the 'out' value of DRV, notably for 'bmCheck' or
|
||||||
actual output is different from that when we're doing a 'bmCheck' or
|
'bmRepair' builds."
|
||||||
'bmRepair' build."
|
|
||||||
(derivation-let drv ((url "url")
|
(derivation-let drv ((url "url")
|
||||||
(output* "out")
|
|
||||||
(executable "executable")
|
(executable "executable")
|
||||||
(mirrors "mirrors")
|
(mirrors "mirrors")
|
||||||
(content-addressed-mirrors "content-addressed-mirrors")
|
(content-addressed-mirrors "content-addressed-mirrors")
|
||||||
|
@ -59,8 +57,7 @@ actual output is different from that when we're doing a 'bmCheck' or
|
||||||
(unless url
|
(unless url
|
||||||
(leave (G_ "~a: missing URL~%") (derivation-file-name drv)))
|
(leave (G_ "~a: missing URL~%") (derivation-file-name drv)))
|
||||||
|
|
||||||
(let* ((output (or output output*))
|
(let* ((url (call-with-input-string url read))
|
||||||
(url (call-with-input-string url read))
|
|
||||||
(drv-output (assoc-ref (derivation-outputs drv) "out"))
|
(drv-output (assoc-ref (derivation-outputs drv) "out"))
|
||||||
(algo (derivation-output-hash-algo drv-output))
|
(algo (derivation-output-hash-algo drv-output))
|
||||||
(hash (derivation-output-hash drv-output)))
|
(hash (derivation-output-hash drv-output)))
|
||||||
|
@ -120,13 +117,8 @@ actual output is different from that when we're doing a 'bmCheck' or
|
||||||
(match args
|
(match args
|
||||||
(((? derivation-path? drv) (? store-path? output))
|
(((? derivation-path? drv) (? store-path? output))
|
||||||
(assert-low-privileges)
|
(assert-low-privileges)
|
||||||
(perform-download (read-derivation-from-file drv)
|
(let ((drv (read-derivation-from-file drv)))
|
||||||
output
|
(perform-download drv output #:print-build-trace? print-build-trace?)))
|
||||||
#: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?))
|
|
||||||
(("--version")
|
(("--version")
|
||||||
(show-version-and-exit))
|
(show-version-and-exit))
|
||||||
(x
|
(x
|
||||||
|
|
Reference in New Issue