[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/07: installer: Make the install attempts counter global.
From: |
John Darrington |
Subject: |
01/07: installer: Make the install attempts counter global. |
Date: |
Sun, 19 Feb 2017 12:30:54 -0500 (EST) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 1001a9ba0b2d43b4d13c32500e1a6250efc01b8e
Author: John Darrington <address@hidden>
Date: Tue Feb 14 08:36:44 2017 +0100
installer: Make the install attempts counter global.
* gnu/system/installer/misc.scm (install-attempts): New variable.
* gnu/system/installer/install.scm (install-page-key-handler): Use it
to generate a unique directory name.
---
gnu/system/installer/install.scm | 8 +++-----
gnu/system/installer/misc.scm | 3 +++
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/gnu/system/installer/install.scm b/gnu/system/installer/install.scm
index 592e49e..8e5deb1 100644
--- a/gnu/system/installer/install.scm
+++ b/gnu/system/installer/install.scm
@@ -102,12 +102,11 @@
(force-reboot))
((buttons-key-matches-symbol? nav ch 'continue)
- (let* ((attempt (page-datum page 'attempt))
- (target (format #f "/target-~a" attempt))
- (window-port (make-window-port config-window)))
+ (let ((target (format #f "/target-~a" install-attempts))
+ (window-port (make-window-port config-window)))
(catch #t
(lambda ()
- (page-set-datum! page 'attempt (1+ attempt))
+ (set! install-attempts (1+ install-attempts))
(and
(fold
(lambda (x prev)
@@ -202,7 +201,6 @@
(page-set-wwin! p pr)
(page-set-datum! p 'navigation buttons)
(page-set-datum! p 'config-window (inner config-window))
- (page-set-datum! p 'attempt 0)
(buttons-post buttons bwin)
(refresh* (outer pr))
(refresh* text-window)
diff --git a/gnu/system/installer/misc.scm b/gnu/system/installer/misc.scm
index f1d1ac7..f9dab42 100644
--- a/gnu/system/installer/misc.scm
+++ b/gnu/system/installer/misc.scm
@@ -29,6 +29,7 @@
#:export (system-role)
#:export (users)
#:export (installer-texinfo-markup)
+ #:export (install-attempts)
#:export (mount-points))
(define livery-title 1)
@@ -76,3 +77,5 @@
(define users '())
+
+(define install-attempts 0)
- branch wip-installer updated (c2eaa77 -> e7c2d41), John Darrington, 2017/02/19
- 06/07: installer: Return to network page after passphrase entry., John Darrington, 2017/02/19
- 01/07: installer: Make the install attempts counter global.,
John Darrington <=
- 03/07: installer: Specify a pid file for wpa_supplicant., John Darrington, 2017/02/19
- 05/07: installer: Avoid flicker in network page., John Darrington, 2017/02/19
- 07/07: installer: Add procudure for starting a wireless interface., John Darrington, 2017/02/19
- 02/07: installer: Kill old dhclient instance before starting new one., John Darrington, 2017/02/19
- 04/07: installer: Create dedicated module to maintainer the page stack., John Darrington, 2017/02/19