From: "Ludovic Courtès" <ludo@gnu.org>
To: 56092@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>,
"Vagrant Cascadian" <vagrant@reproducible-builds.org>
Subject: [bug#56092] [PATCH] challenge: Do nothing when passed zero arguments.
Date: Sun, 19 Jun 2022 15:55:22 +0200 [thread overview]
Message-ID: <20220619135522.4442-1-ludo@gnu.org> (raw)
Previously, 'guix challenge' without arguments would list live store
items that had been locally built. This was deemed confusing,
especially since 'list-live' is an expensive operation.
* guix/scripts/challenge.scm (guix-challenge): Warn and exit with 0 when
FILES is empty.
* doc/guix.texi (Invoking guix challenge): Update accordingly.
---
doc/guix.texi | 38 ++++++++++++++++++++++----------------
guix/scripts/challenge.scm | 5 +++--
2 files changed, 25 insertions(+), 18 deletions(-)
Hi!
This changes ‘guix challenge’ such that, with no arguments, it does
nothing, which is arguably less confusing that the current behavior.
Thoughts?
Ludo’.
diff --git a/doc/guix.texi b/doc/guix.texi
index 86348fc02c..75b8eca38d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -14911,7 +14911,9 @@ any given store item.
The command output looks like this:
@smallexample
-$ guix challenge --substitute-urls="https://@value{SUBSTITUTE-SERVER-1} https://guix.example.org"
+$ guix challenge \
+ --substitute-urls="https://@value{SUBSTITUTE-SERVER-1} https://guix.example.org" \
+ openssl git pius coreutils grep
updating list of substitutes from 'https://@value{SUBSTITUTE-SERVER-1}'... 100.0%
updating list of substitutes from 'https://guix.example.org'... 100.0%
/gnu/store/@dots{}-openssl-1.0.2d contents differ:
@@ -14938,18 +14940,20 @@ updating list of substitutes from 'https://guix.example.org'... 100.0%
@dots{}
-6,406 store items were analyzed:
- - 4,749 (74.1%) were identical
- - 525 (8.2%) differed
- - 1,132 (17.7%) were inconclusive
+5 store items were analyzed:
+ - 2 (40.0%) were identical
+ - 3 (60.0%) differed
+ - 0 (0.0%) were inconclusive
@end smallexample
@noindent
-In this example, @command{guix challenge} first scans the store to
-determine the set of locally-built derivations---as opposed to store
-items that were downloaded from a substitute server---and then queries
-all the substitute servers. It then reports those store items for which
-the servers obtained a result different from the local build.
+In this example, @command{guix challenge} queries all the substitute
+servers for each of the fives packages specified on the command line.
+It then reports those store items for which the servers obtained a
+result different from the local build (if it exists) and/or different
+from one another; here, the @samp{local hash} lines indicate that a
+local build result was available for each of these packages and shows
+its hash.
@cindex non-determinism, in package builds
As an example, @code{guix.example.org} always gets a different answer.
@@ -15005,19 +15009,21 @@ whether @code{@value{SUBSTITUTE-SERVER-1}} and other substitute servers obtain t
same build result as you did with:
@example
-$ guix challenge @var{package}
+guix challenge @var{package}
@end example
-@noindent
-where @var{package} is a package specification such as
-@code{guile@@2.0} or @code{glibc:debug}.
-
The general syntax is:
@example
-guix challenge @var{options} [@var{packages}@dots{}]
+guix challenge @var{options} @var{argument}@dots{}
@end example
+@noindent
+where @var{argument} is a package specification such as
+@code{guile@@2.0} or @code{glibc:debug} or, alternatively, a store file
+name as returned, for example, by @command{guix build} or @command{guix
+gc --list-live}.
+
When a difference is found between the hash of a locally-built item and
that of a server-provided substitute, or among substitutes provided by
different servers, the command displays it as in the example above and
diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm
index 96ffe53a85..1fdf245505 100644
--- a/guix/scripts/challenge.scm
+++ b/guix/scripts/challenge.scm
@@ -530,8 +530,9 @@ (define-command (guix-challenge . args)
(current-terminal-columns (terminal-columns)))
(let ((files (match files
(()
- (filter (cut locally-built? store <>)
- (live-paths store)))
+ (warning
+ (G_ "no arguments specified, nothing to do~%"))
+ (exit 0))
(x
files))))
(set-build-options store
base-commit: 7f208f68dea828fe02718ca8ce81d5975136cff8
--
2.36.1
next reply other threads:[~2022-06-19 13:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-19 13:55 Ludovic Courtès [this message]
2022-06-20 14:48 ` [bug#56092] [PATCH] challenge: Do nothing when passed zero arguments Maxime Devos
2022-06-20 20:15 ` Ludovic Courtès
2022-06-20 20:18 ` Maxime Devos
2022-07-02 23:43 ` bug#56092: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220619135522.4442-1-ludo@gnu.org \
--to=ludo@gnu.org \
--cc=56092@debbugs.gnu.org \
--cc=vagrant@reproducible-builds.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).