~ruther/guix-local

a89dde1ed89a53f33556ab12ec73bafe495a796c — Ludovic Courtès 10 years ago f151298
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.
2 files changed, 5 insertions(+), 5 deletions(-)

M guix/scripts/challenge.scm
M guix/scripts/substitute.scm
M guix/scripts/challenge.scm => guix/scripts/challenge.scm +2 -4
@@ 125,10 125,8 @@ taken since we do not import the archives."
                                              servers))
                       ;; No 'assert-valid-narinfo' on purpose.
                       (narinfos -> (fold (lambda (narinfo vhash)
                                            (if narinfo
                                                (vhash-cons (narinfo-path narinfo) narinfo
                                                            vhash)
                                                vhash))
                                            (vhash-cons (narinfo-path narinfo) narinfo
                                                        vhash))
                                          vlist-null
                                          remote)))
    (return (filter-map (lambda (item local)

M guix/scripts/substitute.scm => guix/scripts/substitute.scm +3 -1
@@ 598,7 598,9 @@ information is available locally."
                         (let-values (((valid? value)
                                       (cached-narinfo cache path)))
                           (if valid?
                               (values (cons value cached) missing)
                               (if value
                                   (values (cons value cached) missing)
                                   (values cached missing))
                               (values cached (cons path missing)))))
                       '()
                       '()