Skip to content
Snippets Groups Projects
Commit c6e94859 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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".
parent a7e59c50
No related branches found
No related tags found
No related merge requests found
...@@ -630,9 +630,10 @@ (define (guix-substitute-binary . args) ...@@ -630,9 +630,10 @@ (define (guix-substitute-binary . args)
(with-error-handling ; for signature errors (with-error-handling ; for signature errors
(match args (match args
(("--query") (("--query")
(let ((cache (delay (open-cache %cache-url)))) (let ((cache (delay (open-cache %cache-url)))
(acl (current-acl)))
(define (valid? obj) (define (valid? obj)
(and (narinfo? obj) (valid-narinfo? obj))) (and (narinfo? obj) (valid-narinfo? obj acl)))
(let loop ((command (read-line))) (let loop ((command (read-line)))
(or (eof-object? command) (or (eof-object? command)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment