mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
substitute-binary: Avoid reloading the ACL repeatedly.
* guix/scripts/substitute-binary.scm (guix-substitute-binary) <--query>: Cache the result of (current-acl); pass it to 'valid-narinfo?' calls. This saves 12% wall-clock time for "guix build emacs -n".
This commit is contained in:
parent
a7e59c50d2
commit
c6e9485924
1 changed files with 3 additions and 2 deletions
|
@ -630,9 +630,10 @@ (define (guix-substitute-binary . args)
|
|||
(with-error-handling ; for signature errors
|
||||
(match args
|
||||
(("--query")
|
||||
(let ((cache (delay (open-cache %cache-url))))
|
||||
(let ((cache (delay (open-cache %cache-url)))
|
||||
(acl (current-acl)))
|
||||
(define (valid? obj)
|
||||
(and (narinfo? obj) (valid-narinfo? obj)))
|
||||
(and (narinfo? obj) (valid-narinfo? obj acl)))
|
||||
|
||||
(let loop ((command (read-line)))
|
||||
(or (eof-object? command)
|
||||
|
|
Loading…
Reference in a new issue