substitute-binary: Correctly handle missing narinfos in `--query' mode.

* guix/scripts/substitute-binary.scm (guix-substitute-binary)["--query"]("have",
  "info"): Filter SUBSTITUTABLE through `narinfo?'.
This commit is contained in:
Ludovic Courtès 2013-04-12 15:52:27 +02:00
parent c7b62db614
commit f03f0c9a86
1 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ failure."
(for-each (lambda (narinfo) (for-each (lambda (narinfo)
(when narinfo (when narinfo
(format #t "~a~%" (narinfo-path narinfo)))) (format #t "~a~%" (narinfo-path narinfo))))
substitutable) (filter narinfo? substitutable))
(newline))) (newline)))
(("info" paths ..1) (("info" paths ..1)
;; Reply info about PATHS if it's in CACHE. ;; Reply info about PATHS if it's in CACHE.
@ -216,7 +216,7 @@ failure."
(format #t "~a\n~a\n" (format #t "~a\n~a\n"
(or (narinfo-file-size narinfo) 0) (or (narinfo-file-size narinfo) 0)
(or (narinfo-size narinfo) 0))) (or (narinfo-size narinfo) 0)))
substitutable) (filter narinfo? substitutable))
(newline))) (newline)))
(wtf (wtf
(error "unknown `--query' command" wtf))) (error "unknown `--query' command" wtf)))