Subject: bug#35542: Installer does not display full backtrace on error

From: Mathieu Othacehe <[email-masked]>
Date: Tue, 14 May 2019 14:09:52 +0200

Hey Ludo,

> That would ensure we’re only changing Guile’s notion of the terminal
> width and not interfering with other tools we might launch as child
> processes.
>
> Thoughts?

Seems like a better idea indeed. Here's an update patch.

About using 200 or a much larger value as Danny suggested, I don't have
a strong opinion myself. WDYT?

Thanks,

Mathieu
>From d5f792414d0666d554dc8c7b6fee351bbe7a1c14 Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <[email-masked]>
Date: Tue, 14 May 2019 14:05:36 +0200
Subject: [PATCH] installer: Increase backtrace verbosity.

* gnu/installer.scm (installer-program): Set terminal-width to 200 to
make guile backtraces more verbose.
---
 gnu/installer.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/installer.scm b/gnu/installer.scm
index 3dd76707bf..40c06af320 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -336,6 +336,8 @@ selected keymap."
                          (gnu services herd)
                          (guix i18n)
                          (guix build utils)
+                         ((system repl debug)
+                          #:select (terminal-width))
                          (ice-9 match))
 
             ;; Initialize gettext support so that installers can use
@@ -359,6 +361,11 @@ selected keymap."
             (bindtextdomain "xkeyboard-config"
                             #+(file-append xkeyboard-config "/share/locale"))
 
+            ;; Initialize 'terminal-width' in (system repl debug)
+            ;; to a large-enough value to make backtrace more
+            ;; verbose.
+            (terminal-width 200)
+
             (let* ((current-installer newt-installer)
                    (steps (#$steps current-installer)))
               ((installer-init current-installer))
-- 
2.17.1