[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/10: weather: Use the same substitute URLs as guix-daemon.
From: |
guix-commits |
Subject: |
05/10: weather: Use the same substitute URLs as guix-daemon. |
Date: |
Mon, 11 Dec 2023 17:50:38 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 7e113695864f8e8a8f6b642c95175094971cdb85
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Nov 10 21:42:50 2023 +0100
weather: Use the same substitute URLs as guix-daemon.
* guix/scripts/weather.scm (%default-options): Remove ‘substitute-urls’.
(guix-weather): Call ‘substitute-urls’ when OPTS doesn’t have it. Warn
when ‘substitute-urls’ returns #f.
* doc/guix.texi (Invoking guix weather): Adjust accordingly.
Change-Id: I3e9100074f2ad559e5c408660db70430d64f2bef
---
doc/guix.texi | 5 +++--
guix/scripts/weather.scm | 12 +++++++++---
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 3ad8508a32..7fd94f562f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -16566,8 +16566,9 @@ The available options are listed below.
@table @code
@item --substitute-urls=@var{urls}
@var{urls} is the space-separated list of substitute server URLs to
-query. When this option is omitted, the default set of substitute
-servers is queried.
+query. When this option is omitted, the URLs specified with the
+@option{--substitute-urls} option of @command{guix-daemon} are used or,
+as a last resort, the default set of substitute URLs.
@item --system=@var{system}
@itemx -s @var{system}
diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm
index 140df3435f..7e302fcea7 100644
--- a/guix/scripts/weather.scm
+++ b/guix/scripts/weather.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Kyle Meyer <kyle@kyleam.com>
;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
@@ -391,7 +391,7 @@ Report the availability of substitutes.\n"))
%standard-native-build-options))
(define %default-options
- `((substitute-urls . ,%default-substitute-urls)))
+ '())
(define (load-manifest file)
"Load the manifest from FILE and return the list of packages it refers to."
@@ -582,7 +582,13 @@ SERVER. Display information for packages with at least
THRESHOLD dependents."
(let* ((opts (parse-command-line args %options
(list %default-options)
#:build-options? #f))
- (urls (assoc-ref opts 'substitute-urls))
+ (urls (or (assoc-ref opts 'substitute-urls)
+ (with-store store
+ (substitute-urls store))
+ (begin
+ (warning (G_ "could not determine current \
+substitute URLs; using defaults~%"))
+ %default-substitute-urls)))
(systems (match (filter-map (match-lambda
(('system . system) system)
(_ #f))
- branch master updated (4bf4e340b7 -> 46ec8592f7), guix-commits, 2023/12/11
- 01/10: gnu: libgpg-error: Do not assume that target is a triplet., guix-commits, 2023/12/11
- 04/10: challenge: Use the same substitute URLs as guix-daemon., guix-commits, 2023/12/11
- 07/10: gnu: openvpn: Update to 2.6.7., guix-commits, 2023/12/11
- 09/10: gnu: lean: Use G-expressions., guix-commits, 2023/12/11
- 10/10: gnu: lean: Update to 3.51.1., guix-commits, 2023/12/11
- 05/10: weather: Use the same substitute URLs as guix-daemon.,
guix-commits <=
- 06/10: weather: Report unauthorized substitute servers., guix-commits, 2023/12/11
- 08/10: gnu: pdfarranger: Update to 1.10.1., guix-commits, 2023/12/11
- 02/10: doc: suggest using pre-inst-env for git-send-email on foreign distros, guix-commits, 2023/12/11
- 03/10: daemon: Implement ‘substitute-urls’ RPC., guix-commits, 2023/12/11