From patchwork Thu Nov 3 19:19:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 44275 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CA44E27BBEB; Thu, 3 Nov 2022 19:21:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 946C327BBE9 for ; Thu, 3 Nov 2022 19:21:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqflv-0004xw-PM; Thu, 03 Nov 2022 15:21:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqflv-0004xe-7F for guix-patches@gnu.org; Thu, 03 Nov 2022 15:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqflu-0004mB-V5 for guix-patches@gnu.org; Thu, 03 Nov 2022 15:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqflu-0004pP-QI for guix-patches@gnu.org; Thu, 03 Nov 2022 15:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#59003] [PATCH 1/7] installer: Warn about hardware support after the welcome page. References: <20221103191756.16265-1-ludo@gnu.org> In-Reply-To: <20221103191756.16265-1-ludo@gnu.org> Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 03 Nov 2022 19:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59003 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59003@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 59003-submit@debbugs.gnu.org id=B59003.166750320318411 (code B ref 59003); Thu, 03 Nov 2022 19:21:02 +0000 Received: (at 59003) by debbugs.gnu.org; 3 Nov 2022 19:20:03 +0000 Received: from localhost ([127.0.0.1]:50765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqfkw-0004ml-Uu for submit@debbugs.gnu.org; Thu, 03 Nov 2022 15:20:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqfkm-0004l7-Q8 for 59003@debbugs.gnu.org; Thu, 03 Nov 2022 15:19:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqfkh-0004Tb-Hj; Thu, 03 Nov 2022 15:19:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=vYtf1NKB6x+4crIIovUkiCZ/5k3CbwhBxIMNVcv/B0Y=; b=C7JOF9ZpcqTBIW 3Xn5eV1lWMvmpCEk2rEF44i70XlwS/VbgO4CA1nc31M9TZ0EhgH0w7iKRsI0VVIUE3fIFrPhAwwHB U+PyyrZHB2P/S1ywq3MG/exO4KGsvb03REYcYaUJ7PMVdgolAX8VxYZkIBwJmFNxDpFhsNtAGkk7H 8h+51JwDa5MCwA+No0xoKEJd3UbT7Pqnd9aEG6wNBpNYMZUHobxb7smj+N4+dXsM+2R7bb73ufGId 8+UJXDumun0+aJanaWlGvGjFI2HMcpUS7DkDDuoA+4dKt+yFTzgVMpZw3t17NYmgSCIDRtil+yzhn y2jUhLWq0aXZ3iaYWZ8Q==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqfkh-0001MS-5D; Thu, 03 Nov 2022 15:19:47 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 3 Nov 2022 20:19:29 +0100 Message-Id: <20221103191935.16336-1-ludo@gnu.org> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 -;;; Copyright © 2020 Ludovic Courtès +;;; Copyright © 2020, 2022 Ludovic Courtès ;;; Copyright © 2022 Florian Pelz ;;; ;;; 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))