guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 3fbe4aa9f3f13022e19c2299a436fec77be9a9f2
Author: Ludovic Courtès <[email protected]>
AuthorDate: Mon Jul 6 23:37:34 2026 +0200

    weather: Install a timeout on connection establishment.
    
    Previously ‘guix weather’ would wait for the system timeout to be
    triggered (typically more than 120s) when establishing a connection to a
    substitute server.
    
    * guix/scripts/weather.scm (guix-weather): Parameterize
    ‘default-connection-establishment-timeout’.
    
    Signed-off-by: Ludovic Courtès <[email protected]>
---
 guix/scripts/weather.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm
index b55ae338e2..23bc1154ec 100644
--- a/guix/scripts/weather.scm
+++ b/guix/scripts/weather.scm
@@ -31,6 +31,7 @@
   #:use-module (guix store)
   #:use-module (guix gexp)
   #:use-module (guix colors)
+  #:autoload   (guix build download) (default-connection-establishment-timeout)
   #:use-module ((guix build syscalls) #:select (terminal-columns))
   #:use-module ((guix build utils) #:select (every*))
   #:use-module (guix substitutes)
@@ -613,6 +614,8 @@ SERVER.  Display information for packages with at least 
THRESHOLD dependents."
   (with-error-handling
     (parameterize ((current-terminal-columns (terminal-columns))
 
+                   (default-connection-establishment-timeout 10)
+
                    ;; Set grafting upfront in case the user's input depends on
                    ;; it (e.g., a manifest or code snippet that calls
                    ;; 'gexp->derivation').

Reply via email to