[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/11: installer: Bypass connectivity check when /tmp/installer-assume-o
From: |
guix-commits |
Subject: |
04/11: installer: Bypass connectivity check when /tmp/installer-assume-online exists. |
Date: |
Thu, 5 Mar 2020 17:42:26 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit f901f5d2bc7ed37235ea8b4c51fde80c227234bb
Author: Ludovic Courtès <address@hidden>
AuthorDate: Wed Feb 19 12:10:47 2020 +0100
installer: Bypass connectivity check when /tmp/installer-assume-online
exists.
This is useful for automated tests.
* gnu/installer/newt/network.scm (wait-service-online)[online?]: New
procedure. Check for /tmp/installer-assume-online.
Use it instead of 'connman-online?'.
---
gnu/installer/newt/network.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gnu/installer/newt/network.scm b/gnu/installer/newt/network.scm
index 40d8581..461d5d9 100644
--- a/gnu/installer/newt/network.scm
+++ b/gnu/installer/newt/network.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Mathieu Othacehe <address@hidden>
-;;; Copyright © 2019 Ludovic Courtès <address@hidden>
+;;; Copyright © 2019, 2020 Ludovic Courtès <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -119,6 +119,10 @@ network devices were found. Do you want to continue
anyway?"))
(define (wait-service-online)
"Display a newt scale until connman detects an Internet access. Do
FULL-VALUE tentatives, spaced by 1 second."
+ (define (online?)
+ (or (connman-online?)
+ (file-exists? "/tmp/installer-assume-online")))
+
(let* ((full-value 5))
(run-scale-page
#:title (G_ "Checking connectivity")
@@ -127,10 +131,10 @@ FULL-VALUE tentatives, spaced by 1 second."
#:scale-update-proc
(lambda (value)
(sleep 1)
- (if (connman-online?)
+ (if (online?)
full-value
(+ value 1))))
- (unless (connman-online?)
+ (unless (online?)
(run-error-page
(G_ "The selected network does not provide access to the \
Internet, please try again.")
- branch master updated (2c2b1ef -> bc8b2ff), guix-commits, 2020/03/05
- 02/11: installer: Use a Guile-Newt snapshot that supports 'form-watch-fd'., guix-commits, 2020/03/05
- 06/11: installer: Honor /tmp/installer-system-init-options., guix-commits, 2020/03/05
- 04/11: installer: Bypass connectivity check when /tmp/installer-assume-online exists.,
guix-commits <=
- 01/11: tests: 'run-basic-test' can enter a root password., guix-commits, 2020/03/05
- 05/11: installer: Run commands without hopping through the shell., guix-commits, 2020/03/05
- 08/11: installer: Fix cow-store umount., guix-commits, 2020/03/05
- 09/11: tests: install: Add %test-gui-installed-os-encrypted., guix-commits, 2020/03/05
- 11/11: ci: Adjust 'channel-build-system' for when the source is a file name., guix-commits, 2020/03/05
- 07/11: tests: install: Add "gui-installed-os"., guix-commits, 2020/03/05
- 03/11: installer: Implement a dialog on /var/guix/installer-socket., guix-commits, 2020/03/05
- 10/11: hydra: Remove uses of _IOLBF., guix-commits, 2020/03/05