guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: installer: Fix installer restart dialog.


From: guix-commits
Subject: 02/02: installer: Fix installer restart dialog.
Date: Wed, 12 Feb 2020 05:03:06 -0500 (EST)

mothacehe pushed a commit to branch master
in repository guix.

commit d008352bfb7e48bb275bdf2ff763832aae231a64
Author: Mathieu Othacehe <address@hidden>
AuthorDate: Mon Feb 10 14:47:56 2020 +0100

    installer: Fix installer restart dialog.
    
    * gnu/installer/newt/final.scm (run-install-failed-page): Propose between
    installer resume or restart. Do actually resume the installation by raising 
an
    &installer-step-abort condition if "Resume" button is pressed. Otherwise, 
keep
    going as the installer will be restarted by login.
    * gnu/installer.scm (installer-program): Remove the associated TODO comment.
---
 gnu/installer.scm            |  7 ++++---
 gnu/installer/newt/final.scm | 21 ++++++++++++++-------
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/gnu/installer.scm b/gnu/installer.scm
index 1676a91..3f4ae4b 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018 Mathieu Othacehe <address@hidden>
+;;; Copyright © 2018, 2020 Mathieu Othacehe <address@hidden>
 ;;; Copyright © 2019 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <address@hidden>
 ;;;
@@ -389,8 +389,9 @@ selected keymap."
                      ;; We did it!  Let's reboot!
                      (sync)
                      (stop-service 'root))
-                    (_                            ;installation failed
-                     ;; TODO: Honor the result of 'run-install-failed-page'.
+                    (_
+                     ;; The installation failed, exit so that it is restarted
+                     ;; by login.
                      #f)))
                 (const #f)
                 (lambda (key . args)
diff --git a/gnu/installer/newt/final.scm b/gnu/installer/newt/final.scm
index 061bcd3..405eee2 100644
--- a/gnu/installer/newt/final.scm
+++ b/gnu/installer/newt/final.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018 Mathieu Othacehe <address@hidden>
+;;; Copyright © 2018, 2020 Mathieu Othacehe <address@hidden>
 ;;; Copyright © 2019, 2020 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -27,6 +27,7 @@
   #:use-module (guix i18n)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
+  #:use-module (ice-9 match)
   #:use-module (newt)
   #:export (run-final-page))
 
@@ -73,12 +74,18 @@ press the button to reboot."))
   'success)
 
 (define (run-install-failed-page)
-  (choice-window
-   (G_ "Installation failed")
-   (G_ "Restart installer")
-   (G_ "Retry system install")
-   (G_ "The final system installation step failed.  You can retry the \
-last step, or restart the installer.")))
+  (match (choice-window
+          (G_ "Installation failed")
+          (G_ "Resume")
+          (G_ "Restart the installer")
+          (G_ "The final system installation step failed.  You can resume from 
\
+a specific step, or restart the installer."))
+    (1 (raise
+        (condition
+         (&installer-step-abort))))
+    (2
+     ;; Keep going, the installer will be restarted later on.
+     #t)))
 
 (define* (run-install-shell locale
                             #:key (users '()))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]