summary refs log tree commit diff
path: root/gnu/installer/steps.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2021-12-29 13:45:26 +0100
committerMathieu Othacehe <othacehe@gnu.org>2022-01-14 14:32:12 +0100
commit84d0d8ad3d7b0e24e89b6d71a4e1784fb3c588c1 (patch)
tree724c47f6cae9ef1dc2e10fb395970cf8fe9417b8 /gnu/installer/steps.scm
parent9d0d4b331d21cf555fdd6a8844d05389d934832c (diff)
downloadguix-84d0d8ad3d7b0e24e89b6d71a4e1784fb3c588c1.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.scm9
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))))))))