unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 67072@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>,
	"Christopher Baines" <guix@cbaines.net>,
	"Josselin Poiret" <dev@jpoiret.xyz>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Mathieu Othacehe" <othacehe@gnu.org>,
	"Ricardo Wurmus" <rekado@elephly.net>,
	"Simon Tournier" <zimon.toutoune@gmail.com>,
	"Tobias Geerinckx-Rice" <me@tobias.gr>
Subject: [bug#67072] [PATCH 2/4] challenge: Use the same substitute URLs as guix-daemon.
Date: Sat, 11 Nov 2023 12:06:24 +0100	[thread overview]
Message-ID: <9ff92e8db2d452552712ec53b095ac74a070bc23.1699700049.git.ludo@gnu.org> (raw)
In-Reply-To: <cover.1699700049.git.ludo@gnu.org>

* guix/scripts/challenge.scm (%default-options): Remove ‘substitute-urls’.
(guix-challenge): Call ‘substitute-urls’ when OPTS doesn’t have it.  Warn
when ‘substitute-urls’ returns #f.

Change-Id: I49be0e89404c1889970a3430967fbb3498d35d99
---
 guix/scripts/challenge.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm
index 01e2f9a2b2..d38171b868 100644
--- a/guix/scripts/challenge.scm
+++ b/guix/scripts/challenge.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015-2017, 2019-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015-2017, 2019-2023 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -504,7 +504,6 @@ (define %options
 
 (define %default-options
   `((system . ,(%current-system))
-    (substitute-urls . ,%default-substitute-urls)
     (difference-report . ,report-differing-files)))
 
 \f
@@ -539,7 +538,13 @@ (define-command (guix-challenge . args)
                             (G_ "no arguments specified, nothing to do~%"))
                            (exit 0))
                           (x
-                           files))))
+                           files)))
+                 (urls (or urls
+                           (substitute-urls store)
+                           (begin
+                             (warning (G_ "could not determine current \
+substitute URLs; using defaults~%"))
+                             %default-substitute-urls))))
              (set-build-options store
                                 #:use-substitutes? #f)
 
-- 
2.41.0





  parent reply	other threads:[~2023-11-11 11:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-11 11:03 [bug#67072] [PATCH 0/4] Helping diagnose substitute setup issues Ludovic Courtès
2023-11-11 11:06 ` [bug#67072] [PATCH 1/4] daemon: Implement ‘substitute-urls’ RPC Ludovic Courtès
2023-11-28 12:09   ` Simon Tournier
2023-12-02 10:13     ` Ludovic Courtès
2023-12-02 13:16       ` Simon Tournier
2023-11-11 11:06 ` Ludovic Courtès [this message]
2023-11-11 11:06 ` [bug#67072] [PATCH 3/4] weather: Use the same substitute URLs as guix-daemon Ludovic Courtès
2023-11-11 11:06 ` [bug#67072] [PATCH 4/4] weather: Report unauthorized substitute servers Ludovic Courtès
2023-11-28 13:14   ` Simon Tournier
2023-12-02 10:20     ` Ludovic Courtès
2023-12-02 13:31       ` Simon Tournier
2023-12-04 14:15       ` [bug#67072] [PATCH v2 0/4] Helping diagnose substitute setup issues Ludovic Courtès
2023-12-11 22:52         ` bug#67072: " Ludovic Courtès
2023-12-04 14:15       ` [bug#67072] [PATCH v2 1/4] daemon: Implement ‘substitute-urls’ RPC Ludovic Courtès
2023-12-04 14:15       ` [bug#67072] [PATCH v2 2/4] challenge: Use the same substitute URLs as guix-daemon Ludovic Courtès
2023-12-04 14:15       ` [bug#67072] [PATCH v2 3/4] weather: " Ludovic Courtès
2023-12-04 14:15       ` [bug#67072] [PATCH v2 4/4] weather: Report unauthorized substitute servers Ludovic Courtès
2023-11-27 17:21 ` [bug#67072] [PATCH 0/4] Helping diagnose substitute setup issues Ludovic Courtès
2023-11-28 13:17   ` Simon Tournier
2023-11-30 10:11   ` Emmanuel Agullo
2023-11-30 10:28     ` 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=9ff92e8db2d452552712ec53b095ac74a070bc23.1699700049.git.ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=67072@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=guix@cbaines.net \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    --cc=zimon.toutoune@gmail.com \
    /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).