From patchwork Wed Nov 9 21:56:32 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: 44416 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 3002227BBEA; Wed, 9 Nov 2022 21:58:53 +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=unavailable 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 2234427BBE9 for ; Wed, 9 Nov 2022 21:58:51 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ost5B-0006AG-Mq; Wed, 09 Nov 2022 16:58:05 -0500 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 1ost59-00069N-TJ for guix-patches@gnu.org; Wed, 09 Nov 2022 16:58:03 -0500 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 1ost58-0004TO-LJ for guix-patches@gnu.org; Wed, 09 Nov 2022 16:58:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ost58-0003j6-H9 for guix-patches@gnu.org; Wed, 09 Nov 2022 16:58:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59003] [PATCH v2 1/6] installer: Warn about hardware support after the welcome page. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 09 Nov 2022 21:58: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.166803102614188 (code B ref 59003); Wed, 09 Nov 2022 21:58:02 +0000 Received: (at 59003) by debbugs.gnu.org; 9 Nov 2022 21:57:06 +0000 Received: from localhost ([127.0.0.1]:41182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ost4D-0003gk-Km for submit@debbugs.gnu.org; Wed, 09 Nov 2022 16:57:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ost4C-0003fw-0J for 59003@debbugs.gnu.org; Wed, 09 Nov 2022 16:57:04 -0500 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 1ost46-00016g-HC; Wed, 09 Nov 2022 16:56:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=DoYYSYRtkGYeamPEb/5xC4wuI27UM+y6cFoUB2G6dIw=; b=F01YSGbVxrNlY5FHGrwO ivsS68SrARJwPhiG6GqPlIAPInocfvRca8FLle5EogJz/w2J7D8QxGNOiknAU66/zNWmtmcjy9lk2 AwniWaqnCfQo1TsyJ+U9HBujtiRtxU5vwRXqG7dfqOKxTlIPb/JGx442gCTjuHpVSN+vlrKdG5Pzh bV9EVfDc2/hbvCvGNZ9mvDjBeHNMAsmE64G2mK97JhK6ERk7DUyCKcvrCvZmnOJwpse7dZSIKsc9y ZxQI3QJpBd3xgLVMX3XGrgiRVYxbpumm3fQqllTG6+ECOEWGHkYlQxLX7MQX32B761ez6G64CkORW Oq/7iJ1ERpJ5hQ==; 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 1ost46-0000ES-3l; Wed, 09 Nov 2022 16:56:58 -0500 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Wed, 9 Nov 2022 22:56:32 +0100 Message-Id: <20221109215637.22445-2-ludo@gnu.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221109215637.22445-1-ludo@gnu.org> References: <20221103191756.16265-1-ludo@gnu.org> <20221109215637.22445-1-ludo@gnu.org> 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: 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 had 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))