Commit Graph

8 Commits (e162050dfc0dee708a7ac5bfcf37d2afd6081604)

Author SHA1 Message Date
Ludovic Courtès 153b62957c
challenge: Add '--verbose'.
* 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.
2017-01-14 00:57:51 +01:00
Ludovic Courtès 4d8e95097e
challenge: Return comparison reports instead of just discrepancies.
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.
2017-01-14 00:57:51 +01:00
Ludovic Courtès 4cdff6ae37
challenge: Use a warning when substitutes are lacking.
* guix/scripts/challenge.scm (discrepancies): Use 'warning' instead of
'leave'.
2017-01-12 23:28:45 +01:00
Ludovic Courtès db8f6b3412
challenge: Disable grafting.
* guix/scripts/challenge.scm (guix-challenge): Set %GRAFT? to #f.
2016-07-14 19:07:07 +02:00
Ludovic Courtès a17417a812
challenge: Use exit code 2 when discrepancies are found.
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.
2016-04-27 23:35:39 +02:00
Ludovic Courtès 7cffaeb604 challenge: Really exit with non-zero upon hash mismatch.
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.
2016-04-06 23:21:26 +02:00
Ludovic Courtès a89dde1ed8 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.
2015-10-28 12:04:03 +01:00
Ludovic Courtès d23c20f1d0 Add 'guix challenge'.
* guix/scripts/challenge.scm, tests/challenge.scm: New files.
* Makefile.am (MODULES): Add the former.
  (SCM_TESTS): Add the latter.
* doc.am (SUBCOMMANDS): Add 'challenge'.
* doc/guix.texi (Substitutes): Add xref to 'guix challenge'.
  (Invoking guix challenge): New node.
* doc/contributing.texi (Submitting Patches): Add note about using 'guix
  challenge'.
* po/guix/POTFILES.in: Add guix/scripts/challenge.scm.
2015-10-20 00:57:36 +02:00