summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-10-28 11:48:27 +0100
committerLudovic Courtès <ludo@gnu.org>2015-10-28 12:04:03 +0100
commita89dde1ed89a53f33556ab12ec73bafe495a796c (patch)
tree41fb3a1a5f1cb47ddd804fe83d7788f3389c930f
parentf151298fa00c9532d29cdc9eb4930fb2bfc23c06 (diff)
substitute: 'lookup-narinfos' returns exactly a list of narinfos.
* guix/scripts/substitute.scm (lookup-narinfos): Filter out #f values from CACHED, such that the end result is exactly a list of narinfos, not interspersed with #f. * guix/scripts/challenge.scm (discrepancies): Assume REMOTE is a list of narinfos.
-rw-r--r--guix/scripts/challenge.scm6
-rwxr-xr-xguix/scripts/substitute.scm4
2 files changed, 5 insertions, 5 deletions
diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm
index 19a9b061b8a..4a0c865b07f 100644
--- a/guix/scripts/challenge.scm
+++ b/guix/scripts/challenge.scm
@@ -125,10 +125,8 @@ taken since we do not import the archives."
125 servers)) 125 servers))
126 ;; No 'assert-valid-narinfo' on purpose. 126 ;; No 'assert-valid-narinfo' on purpose.
127 (narinfos -> (fold (lambda (narinfo vhash) 127 (narinfos -> (fold (lambda (narinfo vhash)
128 (if narinfo 128 (vhash-cons (narinfo-path narinfo) narinfo
129 (vhash-cons (narinfo-path narinfo) narinfo 129 vhash))
130 vhash)
131 vhash))
132 vlist-null 130 vlist-null
133 remote))) 131 remote)))
134 (return (filter-map (lambda (item local) 132 (return (filter-map (lambda (item local)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 0377bb6abe5..34fee5863f2 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -598,7 +598,9 @@ information is available locally."
598 (let-values (((valid? value) 598 (let-values (((valid? value)
599 (cached-narinfo cache path))) 599 (cached-narinfo cache path)))
600 (if valid? 600 (if valid?
601 (values (cons value cached) missing) 601 (if value
602 (values (cons value cached) missing)
603 (values cached missing))
602 (values cached (cons path missing))))) 604 (values cached (cons path missing)))))
603 '() 605 '()
604 '() 606 '()