mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
publish: Simplify 'narinfo-string'.
This is a followup to 222f4661ed
, which
was intended to improve performance of 'narinfo-string'.
* guix/scripts/publish.scm (narinfo-string): Remove 'catch' and
'read-derivation-from-file' call when rendering "Deriver".
This commit is contained in:
parent
ff68088eaa
commit
e53d8a84c6
1 changed files with 2 additions and 12 deletions
|
@ -364,18 +364,8 @@ (define* (narinfo-string store store-path
|
|||
;; expensive to compute and is currently unused.
|
||||
(info (if (not deriver)
|
||||
base-info
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(let ((drv (read-derivation-from-file deriver)))
|
||||
(format #f "~aDeriver: ~a~%"
|
||||
base-info (basename deriver))))
|
||||
(lambda args
|
||||
;; DERIVER might be missing, but that's fine:
|
||||
;; it's only used for <substitutable> where it's
|
||||
;; optional.
|
||||
(if (= ENOENT (system-error-errno args))
|
||||
base-info
|
||||
(apply throw args))))))
|
||||
(format #f "~aDeriver: ~a~%"
|
||||
base-info (basename deriver))))
|
||||
(signature (base64-encode-string
|
||||
(canonical-sexp->string (signed-string info)))))
|
||||
(format #f "~aSignature: 1;~a;~a~%" info (gethostname) signature)))
|
||||
|
|
Loading…
Reference in a new issue