all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 59003@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#59003] [PATCH 1/7] installer: Warn about hardware support after the welcome page.
Date: Thu,  3 Nov 2022 20:19:29 +0100	[thread overview]
Message-ID: <20221103191935.16336-1-ludo@gnu.org> (raw)
In-Reply-To: <20221103191756.16265-1-ludo@gnu.org>

This is a followup to 682639c107908426fe6bf0a1b8404b98b7820290, which
added the uvesafb upfront, before welcome page hard been displayed.

* gnu/installer/newt/welcome.scm (check-hardware-support): New
procedure.
(run-welcome-page): Use it.
---
 gnu/installer/newt/welcome.scm | 85 ++++++++++++++++++----------------
 1 file changed, 44 insertions(+), 41 deletions(-)

diff --git a/gnu/installer/newt/welcome.scm b/gnu/installer/newt/welcome.scm
index 326996b005..1c7372b3be 100644
--- a/gnu/installer/newt/welcome.scm
+++ b/gnu/installer/newt/welcome.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020, 2022 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2022 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -121,55 +121,58 @@ (define (choice->item str)
         (lambda ()
           (destroy-form-and-pop form))))))
 
-(define (run-welcome-page logo)
-  "Run a welcome page with the given textual LOGO displayed at the center of
-the page. Ask the user to choose between manual installation, graphical
-installation and reboot."
-  (begin
-    (when (member "uvesafb" (modules-loaded))
-      (run-error-page (G_ "\
+(define (check-hardware-support)
+  "Warn about unsupported devices."
+  (when (member "uvesafb" (modules-loaded))
+    (run-error-page (G_ "\
 This may be a false alarm, but possibly your graphics hardware does not
 work well with only free software.  Expect trouble.  If after installation,
 the system does not boot, perhaps you will need to add nomodeset to the
 kernel arguments and need to configure the uvesafb kernel module.")
-                      (G_ "Pre-install warning")))
-    (when (file-exists? %core-dump)
-      (match
-          (choice-window
-           (G_ "Previous installation failed")
-           (G_ "Continue")
-           (G_ "Report the failure")
-           (G_ "It seems that the previous installation exited unexpectedly \
+                    (G_ "Pre-install warning"))))
+
+(define (run-welcome-page logo)
+  "Run a welcome page with the given textual LOGO displayed at the center of
+the page. Ask the user to choose between manual installation, graphical
+installation and reboot."
+  (when (file-exists? %core-dump)
+    (match (choice-window
+            (G_ "Previous installation failed")
+            (G_ "Continue")
+            (G_ "Report the failure")
+            (G_ "It seems that the previous installation exited unexpectedly \
 and generated a core dump.  Do you want to continue or to report the failure \
 first?"))
-        (1 #t)
-        (2 (raise
-            (condition
-             (&user-abort-error))))))
-    (run-menu-page
-     (G_ "GNU Guix install")
-     (G_ "Welcome to GNU Guix system installer!
+      (1 #t)
+      (2 (raise
+          (condition
+           (&user-abort-error))))))
+
+  (run-menu-page
+   (G_ "GNU Guix install")
+   (G_ "Welcome to GNU Guix system installer!
 
 You will be guided through a graphical installation program.
 
 If you are familiar with GNU/Linux and you want tight control over \
 the installation process, you can instead choose manual installation.  \
 Documentation is accessible at any time by pressing Ctrl-Alt-F2.")
-     logo
-     #:listbox-items
-     `((,(G_ "Graphical install using a terminal based interface")
-        .
-        ,(const #t))
-       (,(G_ "Install using the shell based process")
-        .
-        ,(lambda ()
-           ;; Switch to TTY3, where a root shell is available for shell based
-           ;; install. The other root TTY's would have been ok too.
-           (system* "chvt" "3")
-           (run-welcome-page logo)))
-       (,(G_ "Reboot")
-        .
-        ,(lambda ()
-           (newt-finish)
-           (reboot))))
-     #:listbox-item->text car)))
+   logo
+   #:listbox-items
+   `((,(G_ "Graphical install using a terminal based interface")
+      .
+      ,check-hardware-support)
+     (,(G_ "Install using the shell based process")
+      .
+      ,(lambda ()
+         (check-hardware-support)
+         ;; Switch to TTY3, where a root shell is available for shell based
+         ;; install. The other root TTY's would have been ok too.
+         (system* "chvt" "3")
+         (run-welcome-page logo)))
+     (,(G_ "Reboot")
+      .
+      ,(lambda ()
+         (newt-finish)
+         (reboot))))
+   #:listbox-item->text car))
-- 
2.38.0





  reply	other threads:[~2022-11-03 19:21 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 19:17 [bug#59003] [PATCH 0/7] [Installer] Warn about unsupported devices Ludovic Courtès
2022-11-03 19:19 ` Ludovic Courtès [this message]
2022-11-03 19:19   ` [bug#59003] [PATCH 2/7] linux-modules: Add support for listing PCI devices Ludovic Courtès
2022-11-05 15:21     ` pelzflorian (Florian Pelz)
2022-11-03 19:19   ` [bug#59003] [PATCH 3/7] linux-modules: Add 'load-pci-device-database' Ludovic Courtès
2022-11-03 19:19   ` [bug#59003] [PATCH 4/7] installer: Use 'current-guix' for extensions Ludovic Courtès
2022-11-05  9:09     ` pelzflorian (Florian Pelz)
2022-11-05 17:34       ` Ludovic Courtès
2022-11-03 19:19   ` [bug#59003] [PATCH 5/7] installer: Error page width is parameterized Ludovic Courtès
2022-11-03 19:19   ` [bug#59003] [PATCH 6/7] installer: Report known-unsupported PCI devices Ludovic Courtès
2022-11-05 17:55     ` pelzflorian (Florian Pelz)
2022-11-06 11:20       ` Ludovic Courtès
2022-11-06 19:06         ` pelzflorian (Florian Pelz)
2022-11-05 20:51     ` [bug#59003] [PATCH 0/7] [Installer] Warn about unsupported devices Mathieu Othacehe
2022-11-05 21:11       ` Mathieu Othacehe
2022-11-09 20:26         ` Ludovic Courtès
2022-11-03 19:19   ` [bug#59003] [PATCH 7/7] installer: Remove unused variable Ludovic Courtès
2022-11-05  8:52   ` [bug#59003] [PATCH 1/7] installer: Warn about hardware support after the welcome page pelzflorian (Florian Pelz)
2022-11-05 18:02     ` pelzflorian (Florian Pelz)
2022-11-09 21:56 ` [bug#59003] [PATCH v2 0/6] [Installer] Warn about unsupported devices Ludovic Courtès
2022-11-09 21:56   ` [bug#59003] [PATCH v2 1/6] installer: Warn about hardware support after the welcome page Ludovic Courtès
2022-11-09 21:56   ` [bug#59003] [PATCH v2 2/6] linux-modules: Add support for listing PCI devices Ludovic Courtès
2022-11-09 21:56   ` [bug#59003] [PATCH v2 3/6] linux-modules: Add 'load-pci-device-database' Ludovic Courtès
2022-11-09 21:56   ` [bug#59003] [PATCH v2 4/6] installer: Use 'current-guix' for extensions Ludovic Courtès
2022-11-09 21:56   ` [bug#59003] [PATCH v2 5/6] installer: Error page width is parameterized Ludovic Courtès
2022-11-09 21:56   ` [bug#59003] [PATCH v2 6/6] installer: Report known-unsupported PCI devices Ludovic Courtès
2022-11-11 11:08     ` pelzflorian (Florian Pelz)
2022-11-15 11:24       ` bug#59003: [PATCH 0/7] [Installer] Warn about unsupported devices Ludovic Courtès
2022-11-15 18:28         ` [bug#59003] " pelzflorian (Florian Pelz)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221103191935.16336-1-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=59003@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.