From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4FsYGkorr2KhKQEAbAwnHQ (envelope-from ) for ; Sun, 19 Jun 2022 15:57:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OGYGGkorr2L8kgAA9RJhRA (envelope-from ) for ; Sun, 19 Jun 2022 15:57:30 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EE6CF126F5 for ; Sun, 19 Jun 2022 15:57:29 +0200 (CEST) Received: from localhost ([::1]:54130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2vQf-0007Zw-3z for larch@yhetil.org; Sun, 19 Jun 2022 09:57:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2vPG-00065f-M0 for guix-patches@gnu.org; Sun, 19 Jun 2022 09:56:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2vPG-0003m2-AM for guix-patches@gnu.org; Sun, 19 Jun 2022 09:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o2vPG-0000d6-5S for guix-patches@gnu.org; Sun, 19 Jun 2022 09:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56092] [PATCH] challenge: Do nothing when passed zero arguments. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 Jun 2022 13:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56092 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56092@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Vagrant Cascadian X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16556469382268 (code B ref -1); Sun, 19 Jun 2022 13:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jun 2022 13:55:38 +0000 Received: from localhost ([127.0.0.1]:52547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2vOr-0000a4-KK for submit@debbugs.gnu.org; Sun, 19 Jun 2022 09:55:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:59354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2vOp-0000YW-Iz for submit@debbugs.gnu.org; Sun, 19 Jun 2022 09:55:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2vOp-00060k-BS for guix-patches@gnu.org; Sun, 19 Jun 2022 09:55:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56976) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2vOo-0003fc-5A; Sun, 19 Jun 2022 09:55:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=4M8YpumkGOTlSkp1aJD4GnbVgW6Qe9qWE7dQbL1Tg/M=; b=ZS4ZSdpgFWdT3z OjY63xnlU0GslGYCKwkki2eWUjuEl05K5EmXoPX7jFAwsdBv7YwlJtkiuxZQWyG7xiB+KVghwi92z 2J6+KV6Tf0SkH6+hBSaTmOt8QRbEPAAo7sIp0JbC9HCTW7RvQvsN9k9lBwdg68EGA9zUzRiUkRx9T jcfkvecMTSMTSqZnkaDMdqPQXSiQBUAiDcBdSD6EDMI7s/hrdY9kkqMKAqzWK2mWZw1+M1D5Wm+lw gEF2CayHQmhpBnVBcEWfUWuDYor93qVUu38TNxSVEX/E7Mn9NQ+8CzWVgcx/yq2tr+jmPuPlIPdZO jUH6PKdBeB/6gFdZW+wQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51218 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2vOn-00064O-LA; Sun, 19 Jun 2022 09:55:33 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sun, 19 Jun 2022 15:55:22 +0200 Message-Id: <20220619135522.4442-1-ludo@gnu.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655647050; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=4M8YpumkGOTlSkp1aJD4GnbVgW6Qe9qWE7dQbL1Tg/M=; b=O51RIRfB04NztvdzC+BM86QIjeBqlC3YbFz+/fPEdddM4z+DWi/t8tmcV2xgbOb8qR6raX WU4kGATAEV/PW4ZgfuWylJi8tT8z6yMte6jiNe3YmdjbObovqDhuUYl3yvYs7GxWTaIbYP tQ5GjGHqvHmxrNFtsLTgdWgcsbhkT5HOTtBAl7VYheLJztiQ+SpiLh1jGej5rEd9Ua0ZHx hwhmpRSBaCPBTEw3TI/vGJlmR2V4TorYVcTDP6NFZQ7ORJVXs3l0AidE99CQp9JktZB0Ax upnH3PJdbP/TWaeB2B3ggfGAvxwkvGp6gyrNaBYRH1uF9wJHbskWX8fCN7Sy/Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655647050; a=rsa-sha256; cv=none; b=FplTd0CeCagZhLAwwiMZWxOCU9uE5LKq3cuL5yZlb6vV581dzbGYpBOu2XEjUqUsZH2wGD 6PzW+Z9G4xZbog+KmmBpio25ZyEzOjfOlWf7p/WQSvX1Sucbh1BhhzEyFYzIqMV4msr3yZ /BDiIC66WU/dgCeKbqKt6RxyxZtLr8piYWEEDQhjLa3c6aYP+x2zhR3jHLChFT5NtL5Eg7 d0g5dpZtP2jZo6u9774I0y8dym2BSJrK6+x7vrG1N6uQ8SRgl5LfXARStgKBh8qBxVTUlB KzkIQ6ZC7vN8tw00IXQeMEx6s7UyTbroHbpa7iLXK+7q/yRI+RC1yXe9xq/TnA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ZS4ZSdpg; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.18 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ZS4ZSdpg; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EE6CF126F5 X-Spam-Score: -2.18 X-Migadu-Scanner: scn0.migadu.com X-TUID: Le83Cx6ICXMV 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