* guix/scripts/challenge.scm (summarize-report): Add #:verbose?
parameter.
[report-hashes]: New procedure. Use it.
Honor VERBOSE? in the 'match case.
(show-help, %options): Add '--verbose'.
(guix-challenge): Honor it.
This makes it easier to distinguish between matches, mismatches, and the
various cases of inconclusive reports.
* guix/scripts/challenge.scm (<discrepancy>): Rename to...
(<comparison-report>): ... this. Add 'result' field.
(comparison-report): New macro.
(comparison-report-predicate, comparison-report-mismatch?)
(comparison-report-match?)
(comparison-report-inconclusive?): New procedures.
(discrepancies): Rename to...
(compare-contents): ... this. Change to return a list of
<comparison-report>. Remove calls to 'warning'.
(summarize-discrepancy): Rename to...
(summarize-report): ... this. Adjust to <comparison-report>.
(guix-challenge): Likewise.
* tests/challenge.scm ("no discrepancies")
("one discrepancy"): Adjust to new API.
("inconclusive: no substitutes")
("inconclusive: no local build"): New tests.
Suggested by John Darrington <john@darrington.wattle.id.au>.
* guix/scripts/challenge.scm (guix-challenge): Exit with 2 when MISSING
is not empty.
* doc/guix.texi (Invoking guix challenge): Document it.
Reported by John Darrington.
* guix/scripts/challenge.scm (guix-challenge): Add an explicit 'exit'
call when ISSUES is empty.
* scripts/guix.in: Add comment about 'exit'.
* doc/guix.texi (Invoking guix challenge): Mention the behavior and exit
code.
* 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.