diff options
| author | Mathieu Othacehe <m.othacehe@gmail.com> | 2020-02-10 14:47:56 +0100 |
|---|---|---|
| committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2020-02-12 10:52:17 +0100 |
| commit | d008352bfb7e48bb275bdf2ff763832aae231a64 (patch) | |
| tree | e8ab9a30a14dec7f1a71f8ee0abf24be1cd810cc | |
| parent | 1d02052067e04d7dd8fd1ec17557ca02a30b9bcf (diff) | |
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.
| -rw-r--r-- | gnu/installer.scm | 7 | ||||
| -rw-r--r-- | gnu/installer/newt/final.scm | 21 |
2 files changed, 18 insertions, 10 deletions
diff --git a/gnu/installer.scm b/gnu/installer.scm index 1676a91801f..3f4ae4bf537 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> | 2 | ;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com> |
| 3 | ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org> | 3 | ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> | 4 | ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
| 5 | ;;; | 5 | ;;; |
| @@ -389,8 +389,9 @@ selected keymap." | |||
| 389 | ;; We did it! Let's reboot! | 389 | ;; We did it! Let's reboot! |
| 390 | (sync) | 390 | (sync) |
| 391 | (stop-service 'root)) | 391 | (stop-service 'root)) |
| 392 | (_ ;installation failed | 392 | (_ |
| 393 | ;; TODO: Honor the result of 'run-install-failed-page'. | 393 | ;; The installation failed, exit so that it is restarted |
| 394 | ;; by login. | ||
| 394 | #f))) | 395 | #f))) |
| 395 | (const #f) | 396 | (const #f) |
| 396 | (lambda (key . args) | 397 | (lambda (key . args) |
diff --git a/gnu/installer/newt/final.scm b/gnu/installer/newt/final.scm index 061bcd3f780..405eee25407 100644 --- a/gnu/installer/newt/final.scm +++ b/gnu/installer/newt/final.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> | 2 | ;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com> |
| 3 | ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> | 3 | ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; | 4 | ;;; |
| 5 | ;;; This file is part of GNU Guix. | 5 | ;;; This file is part of GNU Guix. |
| @@ -27,6 +27,7 @@ | |||
| 27 | #:use-module (guix i18n) | 27 | #:use-module (guix i18n) |
| 28 | #:use-module (srfi srfi-34) | 28 | #:use-module (srfi srfi-34) |
| 29 | #:use-module (srfi srfi-35) | 29 | #:use-module (srfi srfi-35) |
| 30 | #:use-module (ice-9 match) | ||
| 30 | #:use-module (newt) | 31 | #:use-module (newt) |
| 31 | #:export (run-final-page)) | 32 | #:export (run-final-page)) |
| 32 | 33 | ||
| @@ -73,12 +74,18 @@ press the button to reboot.")) | |||
| 73 | 'success) | 74 | 'success) |
| 74 | 75 | ||
| 75 | (define (run-install-failed-page) | 76 | (define (run-install-failed-page) |
| 76 | (choice-window | 77 | (match (choice-window |
| 77 | (G_ "Installation failed") | 78 | (G_ "Installation failed") |
| 78 | (G_ "Restart installer") | 79 | (G_ "Resume") |
| 79 | (G_ "Retry system install") | 80 | (G_ "Restart the installer") |
| 80 | (G_ "The final system installation step failed. You can retry the \ | 81 | (G_ "The final system installation step failed. You can resume from \ |
| 81 | last step, or restart the installer."))) | 82 | a specific step, or restart the installer.")) |
| 83 | (1 (raise | ||
| 84 | (condition | ||
| 85 | (&installer-step-abort)))) | ||
| 86 | (2 | ||
| 87 | ;; Keep going, the installer will be restarted later on. | ||
| 88 | #t))) | ||
| 82 | 89 | ||
| 83 | (define* (run-install-shell locale | 90 | (define* (run-install-shell locale |
| 84 | #:key (users '())) | 91 | #:key (users '())) |
