diff options
author | Leo Famulari <leo@famulari.name> | 2017-07-10 14:37:53 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-07-10 14:37:53 -0400 |
commit | c8eb2b8c60d954b4522555a5c75b7bb4be5a1a4d (patch) | |
tree | 3a2e569e333ccd9265237868d3f46b2d1e04e3a9 /guix/store.scm | |
parent | ad22c7185395a52bd90ea5890a2ac79f44d00352 (diff) | |
parent | 61adfb00b11cc16a70e60f19fd8e0a838a3ef608 (diff) | |
download | guix-patches-c8eb2b8c60d954b4522555a5c75b7bb4be5a1a4d.tar guix-patches-c8eb2b8c60d954b4522555a5c75b7bb4be5a1a4d.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/store.scm')
-rw-r--r-- | guix/store.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/guix/store.scm b/guix/store.scm index d1a4c67ae8..a207d478e6 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -1009,7 +1009,8 @@ error if there is no such root." length as ITEMS. Query substitute information for any item missing from the store at once. Raise a '&nix-protocol-error' exception if reference information for one of ITEMS is missing." - (let* ((local-refs (map (lambda (item) + (let* ((requested items) + (local-refs (map (lambda (item) (or (hash-ref %reference-cache item) (guard (c ((nix-protocol-error? c) #f)) (references store item)))) @@ -1023,7 +1024,9 @@ information for one of ITEMS is missing." ;; Query all the substitutes at once to minimize the cost of ;; launching 'guix substitute' and making HTTP requests. - (substs (substitutable-path-info store missing))) + (substs (if (null? missing) + '() + (substitutable-path-info store missing)))) (when (< (length substs) (length missing)) (raise (condition (&nix-protocol-error (message "cannot determine \ @@ -1038,7 +1041,7 @@ the list of references") (() (let ((result (reverse result))) (for-each (cut hash-set! %reference-cache <> <>) - items result) + requested result) result)) ((item items ...) (match local-refs |