diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2021-12-29 13:45:26 +0100 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2022-02-02 16:46:42 +0100 |
commit | 0d37a5df7e709cadca97cfbbf9c680dfe54b8302 (patch) | |
tree | f9b5877771fe70c92d7b7db327419dc2c6fd7c76 /gnu/installer/newt.scm | |
parent | 8f585083277e64ea1e9a0848ef3c49f12327618c (diff) | |
download | guix-0d37a5df7e709cadca97cfbbf9c680dfe54b8302.tar.gz |
installer: Add crash dump upload support.
Suggested-by: Josselin Poiret <dev@jpoiret.xyz> * gnu/installer/dump.scm: New file. * gnu/installer/newt/dump.scm: New file. * gnu/local.mk (INSTALLER_MODULES): Add them. * gnu/installer/record.scm (<installer>)[dump-page]: New field. * gnu/installer/steps.scm (%current-result): New variable. (run-installer-steps): Update it. * gnu/installer.scm (installer-program): Add tar and gip to the installer path. Add guile-webutils and gnutls to the Guile extensions. Generate and send the crash dump report. * gnu/installer/newt.scm (exit-error): Add a report argument. Display the report id. (dump-page): New procedure. (newt-installer): Update it.
Diffstat (limited to 'gnu/installer/newt.scm')
-rw-r--r-- | gnu/installer/newt.scm | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gnu/installer/newt.scm b/gnu/installer/newt.scm index 4f7fc6f4dc..d48e2c0129 100644 --- a/gnu/installer/newt.scm +++ b/gnu/installer/newt.scm @@ -19,6 +19,7 @@ (define-module (gnu installer newt) #:use-module (gnu installer record) #:use-module (gnu installer utils) + #:use-module (gnu installer newt dump) #:use-module (gnu installer newt ethernet) #:use-module (gnu installer newt final) #:use-module (gnu installer newt parameters) @@ -55,16 +56,19 @@ (newt-finish) (clear-screen)) -(define (exit-error file key args) +(define (exit-error file report key args) (newt-set-color COLORSET-ROOT "white" "red") (let ((width (nearest-exact-integer (* (screen-columns) 0.8))) (height (nearest-exact-integer - (* (screen-rows) 0.7)))) + (* (screen-rows) 0.7))) + (report (if report + (format #f ". It has been uploaded as ~a" report) + ""))) (run-file-textbox-page #:info-text (format #f (G_ "The installer has encountered an unexpected \ -problem. The backtrace is displayed below. Please report it by email to \ -<~a>.") %guix-bug-report-address) +problem. The backtrace is displayed below~a. Please report it by email to \ +<~a>.") report %guix-bug-report-address) #:title (G_ "Unexpected problem") #:file file #:exit-button? #f @@ -123,6 +127,9 @@ problem. The backtrace is displayed below. Please report it by email to \ (define (parameters-page keyboard-layout-selection) (run-parameters-page keyboard-layout-selection)) +(define (dump-page steps) + (run-dump-page steps)) + (define newt-installer (installer (name 'newt) @@ -142,4 +149,5 @@ problem. The backtrace is displayed below. Please report it by email to \ (services-page services-page) (welcome-page welcome-page) (parameters-menu parameters-menu) - (parameters-page parameters-page))) + (parameters-page parameters-page) + (dump-page dump-page))) |