From 62a3756bd90c922c701e899a6c01c556d8e3c75a Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 31 Oct 2022 16:43:09 +0100 Subject: installer: Skip the backtrace page on user abort. When the user aborts the installation because a core dump is discovered or the installation command failed, displaying the abort backtrace doesn't make much sense. Hide it when the abort condition is &user-abort-error and skip directly to the dump page. * gnu/installer/steps.scm (&user-abort-error): New variable. (user-abort-error?): New procedure. * gnu/installer/newt/final.scm (run-install-failed-page): Raise a user-abort-error. * gnu/installer/newt/welcome.scm (run-welcome-page): Ditto. * gnu/installer.scm (installer-program): Hide the backtrace page and directly propose to dump the report when the a &user-abort-error is raised. --- gnu/installer/steps.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gnu/installer/steps.scm') diff --git a/gnu/installer/steps.scm b/gnu/installer/steps.scm index 8b25ae97c8..0c505e40e4 100644 --- a/gnu/installer/steps.scm +++ b/gnu/installer/steps.scm @@ -28,7 +28,10 @@ (define-module (gnu installer steps) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (rnrs io ports) - #:export ( + #:export (&user-abort-error + user-abort-error? + + installer-step make-installer-step installer-step? @@ -50,6 +53,9 @@ (define-module (gnu installer steps) %current-result)) +(define-condition-type &user-abort-error &error + user-abort-error?) + ;; Hash table storing the step results. Use it only for logging and debug ;; purposes. (define %current-result (make-hash-table)) -- cgit v1.2.3