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/steps.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/steps.scm')
-rw-r--r-- | gnu/installer/steps.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/installer/steps.scm b/gnu/installer/steps.scm index c05dfa567a..55433cff31 100644 --- a/gnu/installer/steps.scm +++ b/gnu/installer/steps.scm @@ -52,7 +52,13 @@ %installer-configuration-file %installer-target-dir format-configuration - configuration->file)) + configuration->file + + %current-result)) + +;; Hash table storing the step results. Use it only for logging and debug +;; purposes. +(define %current-result (make-hash-table)) ;; This condition may be raised to abort the current step. (define-condition-type &installer-step-abort &condition @@ -183,6 +189,7 @@ return the accumalated result so far." (let* ((id (installer-step-id step)) (compute (installer-step-compute step)) (res (compute result done-steps))) + (hash-set! %current-result id res) (run (alist-cons id res result) #:todo-steps rest-steps #:done-steps (append done-steps (list step)))))))) |