guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

22/27: Revert "DRAFT installer: Support dry run from Guile."


From: guix-commits
Subject: 22/27: Revert "DRAFT installer: Support dry run from Guile."
Date: Tue, 29 Oct 2024 13:32:20 -0400 (EDT)

janneke pushed a commit to branch hurd-team
in repository guix.

commit 801f855b9790dbdbc396ac7bb2fb77eab07c4032
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue Oct 22 20:51:27 2024 +0200

    Revert "DRAFT installer: Support dry run from Guile."
    
    Building an installer ISO works, running the partitioning page fails:
    
         Wrong type to apply (#<syntax-transformer disk?>).
    
    This reverts commit f157d53f984aa0003e173903b79f5802bc91f779.
---
 gnu/installer.scm                  | 316 +++++++++++++++----------------------
 gnu/installer/dump.scm             |   3 +-
 gnu/installer/newt.scm             |   7 +-
 gnu/installer/newt/final.scm       |   5 +-
 gnu/installer/newt/menu.scm        |   2 +-
 gnu/installer/newt/network.scm     |   2 +-
 gnu/installer/newt/page.scm        |  82 ++--------
 gnu/installer/newt/partition.scm   |  39 +----
 gnu/installer/newt/substitutes.scm |   2 +-
 gnu/installer/newt/timezone.scm    |   2 +-
 gnu/installer/newt/user.scm        |  27 +---
 gnu/installer/newt/utils.scm       |   4 +-
 gnu/installer/newt/welcome.scm     |  13 +-
 gnu/installer/newt/wifi.scm        |  18 +--
 gnu/installer/parted.scm           |  89 +----------
 15 files changed, 160 insertions(+), 451 deletions(-)

diff --git a/gnu/installer.scm b/gnu/installer.scm
index 6e6a3e0a47..31c0ff7ff4 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -32,18 +32,6 @@
   #:use-module (guix channels)
   #:use-module (guix packages)
   #:use-module (guix git-download)
-
-  #:autoload (gnu installer kernel) (kernel->configuration)
-  #:autoload (gnu installer locale) (locale->configuration)
-  #:autoload (gnu installer newt) (newt-installer)
-  #:autoload (gnu installer newt keymap) (keyboard-layout->configuration)
-  #:autoload (gnu installer parted) (user-partitions->configuration)
-  #:use-module (gnu installer record)
-  #:autoload (gnu installer services) (system-services->configuration)
-  #:autoload (gnu installer steps) (installer-step result-step 
run-installer-steps)
-  #:autoload (gnu installer timezone) (posix-tz->configuration)
-  #:autoload (gnu installer user) (users->configuration)
-
   #:use-module (gnu installer utils)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
@@ -68,9 +56,7 @@
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:use-module (web uri)
-  #:export (installer-program
-            installer-steps
-            run-installer))
+  #:export (installer-program))
 
 (define module-to-import?
   ;; Return true for modules that should be imported.  For (gnu system …) and
@@ -222,7 +208,7 @@ selected keymap."
         (and result (#$apply-keymap result))
         result)))
 
-(define* (installer-steps-gexp #:key dry-run?)
+(define* (installer-steps #:key dry-run?)
   (let ((locale-step (compute-locale-step
                       #:locales-name "locales"
                       #:iso639-languages-name "iso639-languages"
@@ -237,147 +223,131 @@ selected keymap."
             (lambda _
               (#$(compute-keymap-step 'param dry-run?)
                current-installer)))))
-        (installer-steps current-installer
-                         #:keymap-step #$keymap-step
-                         #:logo-file
-                         #$(local-file "installer/aux-files/logo.txt")
-                         #:locale-step #$locale-step
-                         #:timezone-data #$timezone-data
-                         #:pci-database #$(file-append
-                                           pciutils "/share/hwdata/pci.ids.gz")
-                         #:dry-run? #$dry-run?))))
-
-(define* (installer-steps current-installer #:key
-                          dry-run?
-                          keymap-step
-                          locale-step
-                          (logo-file "/dev/null")
-                          pci-database
-                          timezone-data)
-  (list
-   ;; Ask the user to choose a locale among those supported by
-   ;; the glibc.  Install the selected locale right away, so that
-   ;; the user may benefit from any available translation for the
-   ;; installer messages.
-   (installer-step
-    (id 'locale)
-    (description (G_ "Locale"))
-    (compute (lambda _
-               (and locale-step
-                    (locale-step current-installer))))
-    (configuration-formatter locale->configuration))
-
-   ;; Welcome the user and ask them to choose between manual
-   ;; installation and graphical install.
-   (installer-step
-    (id 'welcome)
-    (compute (lambda _
-               ((installer-welcome-page current-installer)
-                logo-file
-                #:pci-database pci-database))))
-
-   ;; Ask the user to select a timezone under glibc format.
-   (installer-step
-    (id 'timezone)
-    (description (G_ "Timezone"))
-    (compute (lambda _
-               (and=> timezone-data
-                      (installer-timezone-page current-installer))))
-    (configuration-formatter posix-tz->configuration))
-
-   ;; The installer runs in a kmscon virtual terminal where loadkeys
-   ;; won't work. kmscon uses libxkbcommon as a backend for keyboard
-   ;; input. It is possible to update kmscon current keymap by sending
-   ;; it a keyboard model, layout, variant and options, in a somehow
-   ;; similar way as what is done with setxkbmap utility.
-   ;;
-   ;; So ask for a keyboard model, layout and variant to update the
-   ;; current kmscon keymap.  For non-Latin layouts, we add an
-   ;; appropriate second layout and toggle via Alt+Shift.
-   (installer-step
-    (id 'keymap)
-    (description (G_ "Keyboard mapping selection"))
-    (compute (lambda _
-               (if (or dry-run? (not keymap-step))
-                   '("en" "US" #f)
-                   (keymap-step current-installer))))
-    (configuration-formatter keyboard-layout->configuration))
-
-   ;; Ask the user to input a hostname for the system.
-   (installer-step
-    (id 'hostname)
-    (description (G_ "Hostname"))
-    (compute (lambda _
-               ((installer-hostname-page current-installer))))
-    (configuration-formatter hostname->configuration))
-
-   ;; Provide an interface above connmanctl, so that the user can select
-   ;; a network susceptible to acces Internet.
-   (installer-step
-    (id 'network)
-    (description (G_ "Network selection"))
-    (compute (lambda _
-               (if dry-run?
-                   '()
-                   ((installer-network-page current-installer))))))
-
-   ;; Ask whether to enable substitute server discovery.
-   (installer-step
-    (id 'substitutes)
-    (description (G_ "Substitute server discovery"))
-    (compute (lambda _
-               (if dry-run?
-                   '()
-                   ((installer-substitutes-page current-installer))))))
-
-   ;; Prompt for users (name, group and home directory).
-   (installer-step
-    (id 'user)
-    (description (G_ "User creation"))
-    (compute (lambda _
-               ((installer-user-page current-installer))))
-    (configuration-formatter users->configuration))
-
-   ;; Ask the user to select the kernel for the system,
-   ;; for x86 systems only.
-   (installer-step
-    (id 'kernel)
-    (description (G_ "Kernel"))
-    (compute (lambda _
-               (if (target-x86?)
-                   ((installer-kernel-page current-installer))
-                   '())))
-    (configuration-formatter (lambda (result)
-                               (kernel->configuration result dry-run?))))
-
-   ;; Ask the user to choose one or many desktop environment(s).
-   (installer-step
-    (id 'services)
-    (description (G_ "Services"))
-    (compute (lambda _
-               ((installer-services-page current-installer))))
-    (configuration-formatter system-services->configuration))
-
-   ;; Run a partitioning tool allowing the user to modify
-   ;; partition tables, partitions and their mount points.
-   ;; Do this last so the user has something to boot if any
-   ;; of the previous steps didn't go as expected.
-   (installer-step
-    (id 'partition)
-    (description (G_ "Partitioning"))
-    (compute (lambda _
-               (if dry-run?
-                   '()
-                   ((installer-partitioning-page current-installer)))))
-    (configuration-formatter user-partitions->configuration))
-
-   (installer-step
-    (id 'final)
-    (description (G_ "Configuration file"))
-    (compute
-     (lambda (result prev-steps)
-       ((installer-final-page current-installer)
-        result prev-steps dry-run?))))))
+        (list
+         ;; Ask the user to choose a locale among those supported by
+         ;; the glibc.  Install the selected locale right away, so that
+         ;; the user may benefit from any available translation for the
+         ;; installer messages.
+         (installer-step
+          (id 'locale)
+          (description (G_ "Locale"))
+          (compute (lambda _
+                     (#$locale-step current-installer)))
+          (configuration-formatter locale->configuration))
+
+         ;; Welcome the user and ask them to choose between manual
+         ;; installation and graphical install.
+         (installer-step
+          (id 'welcome)
+          (compute (lambda _
+                     ((installer-welcome-page current-installer)
+                      #$(local-file "installer/aux-files/logo.txt")
+                      #:pci-database
+                      #$(file-append pciutils "/share/hwdata/pci.ids.gz")))))
+
+         ;; Ask the user to select a timezone under glibc format.
+         (installer-step
+          (id 'timezone)
+          (description (G_ "Timezone"))
+          (compute (lambda _
+                     ((installer-timezone-page current-installer)
+                      #$timezone-data)))
+          (configuration-formatter posix-tz->configuration))
+
+         ;; The installer runs in a kmscon virtual terminal where loadkeys
+         ;; won't work. kmscon uses libxkbcommon as a backend for keyboard
+         ;; input. It is possible to update kmscon current keymap by sending
+         ;; it a keyboard model, layout, variant and options, in a somehow
+         ;; similar way as what is done with setxkbmap utility.
+         ;;
+         ;; So ask for a keyboard model, layout and variant to update the
+         ;; current kmscon keymap.  For non-Latin layouts, we add an
+         ;; appropriate second layout and toggle via Alt+Shift.
+         (installer-step
+          (id 'keymap)
+          (description (G_ "Keyboard mapping selection"))
+          (compute (lambda _
+                     (if #$dry-run?
+                         '("en" "US" #f)
+                         (#$(compute-keymap-step 'default dry-run?)
+                       current-installer))))
+          (configuration-formatter keyboard-layout->configuration))
+
+         ;; Ask the user to input a hostname for the system.
+         (installer-step
+          (id 'hostname)
+          (description (G_ "Hostname"))
+          (compute (lambda _
+                     ((installer-hostname-page current-installer))))
+          (configuration-formatter hostname->configuration))
+
+         ;; Provide an interface above connmanctl, so that the user can select
+         ;; a network susceptible to acces Internet.
+         (installer-step
+          (id 'network)
+          (description (G_ "Network selection"))
+          (compute (lambda _
+                     (if #$dry-run?
+                         '()
+                         ((installer-network-page current-installer))))))
+
+         ;; Ask whether to enable substitute server discovery.
+         (installer-step
+          (id 'substitutes)
+          (description (G_ "Substitute server discovery"))
+          (compute (lambda _
+                     (if #$dry-run?
+                         '()
+                         ((installer-substitutes-page current-installer))))))
+
+         ;; Prompt for users (name, group and home directory).
+         (installer-step
+          (id 'user)
+          (description (G_ "User creation"))
+          (compute (lambda _
+                     ((installer-user-page current-installer))))
+          (configuration-formatter users->configuration))
+
+         ;; Ask the user to select the kernel for the system,
+         ;; for x86 systems only.
+         (installer-step
+          (id 'kernel)
+          (description (G_ "Kernel"))
+          (compute (lambda _
+                     (if (target-x86?)
+                         ((installer-kernel-page current-installer))
+                         '())))
+          (configuration-formatter (lambda (result)
+                                     (kernel->configuration result 
#$dry-run?))))
+
+         ;; Ask the user to choose one or many desktop environment(s).
+         (installer-step
+          (id 'services)
+          (description (G_ "Services"))
+          (compute (lambda _
+                     ((installer-services-page current-installer))))
+          (configuration-formatter system-services->configuration))
+
+         ;; Run a partitioning tool allowing the user to modify
+         ;; partition tables, partitions and their mount points.
+         ;; Do this last so the user has something to boot if any
+         ;; of the previous steps didn't go as expected.
+         (installer-step
+          (id 'partition)
+          (description (G_ "Partitioning"))
+          (compute (lambda _
+                     (if #$dry-run?
+                         '()
+                         ((installer-partitioning-page current-installer)))))
+          (configuration-formatter user-partitions->configuration))
+
+         (installer-step
+          (id 'final)
+          (description (G_ "Configuration file"))
+          (compute
+           (lambda (result prev-steps)
+             ((installer-final-page current-installer)
+              result prev-steps #$dry-run?))))))))
 
 (define (provenance-sexp)
   "Return an sexp representing the currently-used channels, for logging
@@ -398,33 +368,6 @@ purposes."
              `(channel ,(channel-name channel) ,url ,(channel-commit 
channel))))
           channels))))
 
-(define* (run-installer #:key dry-run?)
-  "To run the installer from Guile without building it:
-    ./pre-inst-env guile -c '((@ (gnu installer) run-installer) #:dry-run? #t)'
-when using #:dry-run? #t, no root access is required and the LOCALE, KEYMAP,
-and PARTITION pages are skipped."
-  (let* ((dry-run? (and dry-run? 'guile))
-         (current-installer newt-installer)
-         (logo-file (string-append "gnu/" %logo-file))
-         (steps (installer-steps current-installer
-                                 #:logo-file logo-file
-                                 #:dry-run? dry-run?)))
-    (catch #t
-      (lambda _
-        ((installer-init current-installer))
-        (parameterize ((%run-command-in-installer dry-run-command))
-          (let* ((results (run-installer-steps
-                           #:rewind-strategy 'menu
-                           #:menu-proc (installer-menu-page current-installer)
-                           #:steps steps
-                           #:dry-run? dry-run?)))
-            (result-step results 'final))))
-      (const #f)
-      (lambda (key . args)
-        ((installer-exit current-installer))
-        (display-backtrace (make-stack #t) (current-error-port))
-        (apply throw key args)))))
-
 (define* (installer-program #:key dry-run?)
   "Return a file-like object that runs the given INSTALLER."
   (define init-gettext
@@ -459,7 +402,7 @@ and PARTITION pages are skipped."
           (lambda ()
             (set-path-environment-variable "PATH" '("bin" "sbin") inputs)))))
 
-  (define steps (installer-steps-gexp #:dry-run? dry-run?))
+  (define steps (installer-steps #:dry-run? dry-run?))
   (define modules
     (scheme-modules*
      (string-append (current-source-directory) "/..")
@@ -482,8 +425,7 @@ and PARTITION pages are skipped."
                                   #:select? module-to-import?)
                                ((guix config) => ,(make-config.scm)))
         #~(begin
-            (use-modules (gnu installer)
-                         (gnu installer record)
+            (use-modules (gnu installer record)
                          (gnu installer keymap)
                          (gnu installer steps)
                          (gnu installer dump)
diff --git a/gnu/installer/dump.scm b/gnu/installer/dump.scm
index 2bf0bb9a75..f91cbae021 100644
--- a/gnu/installer/dump.scm
+++ b/gnu/installer/dump.scm
@@ -1,6 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
-;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,7 +27,7 @@
   #:use-module (web client)
   #:use-module (web http)
   #:use-module (web response)
-  #:autoload (webutils multipart) (format-multipart-body)
+  #:use-module (webutils multipart)
   #:export (%core-dump
             prepare-dump
             make-dump
diff --git a/gnu/installer/newt.scm b/gnu/installer/newt.scm
index c7614533b5..1fe710340f 100644
--- a/gnu/installer/newt.scm
+++ b/gnu/installer/newt.scm
@@ -48,12 +48,7 @@
   #:use-module (srfi srfi-35)
   #:use-module (ice-9 ftw)
   #:use-module (ice-9 match)
-  #:autoload (newt bindings) (COLORSET-ROOT
-                              newt-finish newt-init
-                              newt-resume
-                              newt-set-color
-                              newt-set-help-callback)
-  #:autoload (newt window) (clear-screen push-help-line)
+  #:use-module (newt)
   #:export (newt-installer))
 
 (define (init)
diff --git a/gnu/installer/newt/final.scm b/gnu/installer/newt/final.scm
index 3df7eeeed3..c4e53f6d79 100644
--- a/gnu/installer/newt/final.scm
+++ b/gnu/installer/newt/final.scm
@@ -20,7 +20,7 @@
 
 (define-module (gnu installer newt final)
   #:use-module (gnu installer final)
-  #:autoload (gnu installer parted) (with-mounted-partitions)
+  #:use-module (gnu installer parted)
   #:use-module (gnu installer steps)
   #:use-module (gnu installer utils)
   #:use-module (gnu installer newt page)
@@ -31,8 +31,7 @@
   #:use-module (srfi srfi-35)
   #:use-module (ice-9 match)
   #:use-module ((ice-9 rdelim) #:select (read-line))
-  #:autoload (newt bindings) (newt-resume newt-suspend)
-  #:autoload (newt window) (clear-screen message-window ternary-window)
+  #:use-module (newt)
   #:export (run-final-page))
 
 (define* (strip-prefix file #:optional (prefix (%installer-target-dir)))
diff --git a/gnu/installer/newt/menu.scm b/gnu/installer/newt/menu.scm
index b281845ee1..e153d3d756 100644
--- a/gnu/installer/newt/menu.scm
+++ b/gnu/installer/newt/menu.scm
@@ -20,7 +20,7 @@
   #:use-module (gnu installer steps)
   #:use-module (gnu installer newt page)
   #:use-module (guix i18n)
-  #:autoload (newt bindings) (newt-finish)
+  #:use-module (newt)
   #:export (run-menu-page))
 
 (define (run-menu-page steps)
diff --git a/gnu/installer/newt/network.scm b/gnu/installer/newt/network.scm
index d5a22e4054..b22cc71305 100644
--- a/gnu/installer/newt/network.scm
+++ b/gnu/installer/newt/network.scm
@@ -32,7 +32,7 @@
   #:use-module (ice-9 match)
   #:use-module (web client)
   #:use-module (web response)
-  #:autoload (newt window) (choice-window)
+  #:use-module (newt)
   #:export (run-network-page))
 
 ;; Maximum length of a technology name.
diff --git a/gnu/installer/newt/page.scm b/gnu/installer/newt/page.scm
index e6fcf4bbf9..64a2916826 100644
--- a/gnu/installer/newt/page.scm
+++ b/gnu/installer/newt/page.scm
@@ -33,74 +33,24 @@
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
-  #:autoload (newt bindings) (COLORSET-ROOT
-                              newt-refresh
-                              newt-resume
-                              newt-set-color
-                              newt-suspend)
-  #:autoload (newt checkboxtree) (make-checkboxtree
-                                  add-entry-to-checkboxtree
-                                  current-checkbox-selection)
-  #:autoload (newt components) (FLAG-BORDER
-                                FLAG-MULTIPLE
-                                FLAG-NOF12
-                                FLAG-PASSWORD
-                                FLAG-RETURNEXIT
-                                FLAG-ROLE-TOGGLE
-                                FLAG-SCROLL
-                                FLAG-SELECTED
-                                add-component-callback
-                                checkbox-value
-                                components=?
-                                make-button
-                                make-checkbox
-                                make-compact-button)
-  #:autoload (newt entry) (make-entry
-                           entry-value set-entry-flags set-entry-text)
-  #:autoload (newt form) (make-form
-                          FD-EXCEPT FD-READ KEY-DELETE
-                          add-component-to-form
-                          add-components-to-form
-                          draw-form
-                          form-add-hotkey
-                          form-watch-fd
-                          run-form
-                          set-current-component)
-  #:autoload (newt grid) (make-grid
-                          ANCHOR-LEFT
-                          GRID-ELEMENT-COMPONENT GRID-ELEMENT-SUBGRID
-                          add-form-to-grid
-                          horizontal-stacked-grid
-                          make-wrapped-grid-window
-                          set-grid-field
-                          vertically-stacked-grid)
-  #:autoload (newt listbox) (make-listbox
-                             append-entry-to-listbox
-                             current-listbox-entry
-                             listbox-selection
-                             set-current-listbox-entry
-                             set-current-listbox-entry-by-key)
-  #:autoload (newt scale) (make-scale set-scale-value)
-  #:autoload (newt textbox) (make-textbox
-                             make-reflowed-textbox reflow-text 
set-textbox-text)
-  #:autoload (newt window) (clear-screen)
+  #:use-module (newt)
   #:export (default-listbox-height
 
-             draw-info-page
-             draw-connecting-page
-             run-input-page
-             run-error-page
-             run-confirmation-page
-             run-listbox-selection-page
-             run-scale-page
-             run-checkbox-tree-page
-             run-file-textbox-page
-             %ok-button
-             %exit-button
-             run-textbox-page
-             run-dump-page
-
-             run-form-with-clients))
+            draw-info-page
+            draw-connecting-page
+            run-input-page
+            run-error-page
+            run-confirmation-page
+            run-listbox-selection-page
+            run-scale-page
+            run-checkbox-tree-page
+            run-file-textbox-page
+            %ok-button
+            %exit-button
+            run-textbox-page
+            run-dump-page
+
+            run-form-with-clients))
 
 ;;; Commentary:
 ;;;
diff --git a/gnu/installer/newt/partition.scm b/gnu/installer/newt/partition.scm
index ccf551f909..3a7e679577 100644
--- a/gnu/installer/newt/partition.scm
+++ b/gnu/installer/newt/partition.scm
@@ -33,43 +33,8 @@
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
-  #:autoload (newt window) (choice-window)
-  #:autoload (parted disk) (DISK-TYPE-FEATURE-PARTITION-NAME
-                            PARTITION-FLAG-BOOT
-                            PARTITION-FLAG-ESP
-                            disk-commit
-                            disk-new
-                            disk-partitions
-                            disk-probe
-                            disk-remove-all-partitions
-                            disk-remove-partition*
-                            disk-type-check-feature
-                            extended-partition?
-                            freespace-partition?
-                            logical-partition?
-                            metadata-partition?
-                            normal-partition?
-                            partition-get-path
-                            partition-is-flag-available?
-                            partition-set-flag
-                            partition-set-name
-                            partition-set-system)
-  #:autoload (parted filesystem) (filesystem-type-get)
-  #:autoload (parted structs) (device-path
-                               disk?
-                               disk-device
-                               disk-disk-type
-                               geometry-start
-                               partition?
-                               partition-disk
-                               partition-end
-                               partition-length
-                               partition-prev
-                               partition-start)
-  #:autoload (parted unit) (UNIT-SECTOR
-                            unit-format
-                            unit-format-custom
-                            unit-parse)
+  #:use-module (newt)
+  #:use-module (parted)
   #:export (run-partitioning-page))
 
 (define (button-exit-action)
diff --git a/gnu/installer/newt/substitutes.scm 
b/gnu/installer/newt/substitutes.scm
index 9a022122d8..7599d450b6 100644
--- a/gnu/installer/newt/substitutes.scm
+++ b/gnu/installer/newt/substitutes.scm
@@ -20,7 +20,7 @@
   #:use-module (gnu installer substitutes)
   #:use-module (gnu installer utils)
   #:use-module (guix i18n)
-  #:autoload (newt window) (choice-window)
+  #:use-module (newt)
   #:use-module (ice-9 match)
   #:export (run-substitutes-page))
 
diff --git a/gnu/installer/newt/timezone.scm b/gnu/installer/newt/timezone.scm
index 857a0e5178..bed9f9d5cb 100644
--- a/gnu/installer/newt/timezone.scm
+++ b/gnu/installer/newt/timezone.scm
@@ -27,7 +27,7 @@
   #:use-module (srfi srfi-35)
   #:use-module (ice-9 match)
   #:use-module (ice-9 receive)
-  #:autoload (newt listbox) (append-entry-to-listbox)
+  #:use-module (newt)
   #:export (run-timezone-page))
 
 ;; Information textbox width.
diff --git a/gnu/installer/newt/user.scm b/gnu/installer/newt/user.scm
index dad36983af..a1c797688e 100644
--- a/gnu/installer/newt/user.scm
+++ b/gnu/installer/newt/user.scm
@@ -24,32 +24,7 @@
   #:use-module (gnu installer newt utils)
   #:use-module (gnu installer utils)
   #:use-module (guix i18n)
-  #:autoload (newt components) (FLAG-BORDER
-                                FLAG-PASSWORD
-                                FLAG-ROLE-TOGGLE
-                                FLAG-SCROLL
-                                add-component-callback
-                                components=?
-                                make-button
-                                make-checkbox
-                                make-compact-button
-                                make-label)
-  #:autoload (newt entry) (make-entry
-                           entry-value set-entry-flags set-entry-text)
-  #:autoload (newt form) (make-form
-                          add-components-to-form
-                          run-form
-                          set-current-component)
-  #:autoload (newt grid) (make-grid
-                          GRID-ELEMENT-COMPONENT GRID-ELEMENT-SUBGRID
-                          add-form-to-grid
-                          horizontal-stacked-grid
-                          make-wrapped-grid-window
-                          set-grid-field
-                          vertically-stacked-grid)
-  #:autoload (newt listbox) (make-listbox
-                             append-entry-to-listbox current-listbox-entry)
-  #:autoload (newt textbox) (make-reflowed-textbox reflow-text 
set-textbox-text)
+  #:use-module (newt)
   #:use-module (ice-9 match)
   #:use-module (ice-9 receive)
   #:use-module (srfi srfi-1)
diff --git a/gnu/installer/newt/utils.scm b/gnu/installer/newt/utils.scm
index c15480fd9f..dfb113e0c6 100644
--- a/gnu/installer/newt/utils.scm
+++ b/gnu/installer/newt/utils.scm
@@ -1,6 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,8 +18,7 @@
 
 (define-module (gnu installer newt utils)
   #:use-module (ice-9 receive)
-  #:autoload (newt form) (destroy-form)
-  #:autoload (newt window) (pop-window screen-size)
+  #:use-module (newt)
   #:export (screen-columns
             screen-rows
 
diff --git a/gnu/installer/newt/welcome.scm b/gnu/installer/newt/welcome.scm
index 6eb9270b35..f821374cb7 100644
--- a/gnu/installer/newt/welcome.scm
+++ b/gnu/installer/newt/welcome.scm
@@ -36,18 +36,7 @@
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:use-module (ice-9 receive)
-  #:autoload (newt bindings) (newt-finish)
-  #:autoload (newt components) (FLAG-BORDER FLAG-RETURNEXIT 
make-compact-button)
-  #:autoload (newt grid) (GRID-ELEMENT-COMPONENT
-                          add-form-to-grid
-                          make-wrapped-grid-window
-                          vertically-stacked-grid)
-  #:autoload (newt form) (make-form)
-  #:autoload (newt listbox) (make-listbox
-                             append-entry-to-listbox current-listbox-entry)
-  #:autoload (newt textbox) (make-textbox
-                             make-reflowed-textbox set-textbox-text)
-  #:autoload (newt window) (choice-window)
+  #:use-module (newt)
   #:export (run-welcome-page))
 
 ;; Expected width and height for the logo.
diff --git a/gnu/installer/newt/wifi.scm b/gnu/installer/newt/wifi.scm
index 39ba103378..8a87cbdf4b 100644
--- a/gnu/installer/newt/wifi.scm
+++ b/gnu/installer/newt/wifi.scm
@@ -33,23 +33,7 @@
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
-  #:autoload (newt components) (FLAG-BORDER
-                                FLAG-RETURNEXIT FLAG-SCROLL
-                                components=?
-                                make-button)
-  #:autoload (newt form) (make-form
-                          add-components-to-form run-form)
-  #:autoload (newt grid) (make-grid
-                          ANCHOR-TOP
-                          GRID-ELEMENT-COMPONENT
-                          basic-window-grid
-                          make-wrapped-grid-window
-                          set-grid-field)
-  #:autoload (newt listbox) (make-listbox
-                             append-entry-to-listbox
-                             clear-listbox
-                             current-listbox-entry)
-  #:autoload (newt textbox) (make-reflowed-textbox)
+  #:use-module (newt)
   #:export (run-wifi-page))
 
 ;; This record associates a connman service to its key the listbox.
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index c17312258a..ccddc64f11 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -44,94 +44,7 @@
   #:use-module (guix records)
   #:use-module (guix utils)
   #:use-module (guix i18n)
-  #:autoload (parted constraint) (constraint-any
-                                  constraint-new
-                                  constraint-intersect
-                                  constraint-new-from-max
-                                  constraint-new-from-min
-                                  constraint-new-from-min-max)
-  #:autoload (parted device) (device-close
-                              device-get-optimal-aligned-constraint
-                              device-open
-                              device-sync
-                              device-type
-                              device-type->string
-                              devices
-                              probe-all-devices!)
-  #:autoload (parted disk) (DISK-TYPE-FEATURE-EXTENDED
-                            DISK-TYPE-FEATURE-PARTITION-NAME
-                            PARTITION-FLAG-BIOS-GRUB
-                            PARTITION-FLAG-BOOT
-                            PARTITION-FLAG-ESP
-                            data-partition?
-                            disk-add-partition
-                            disk-extended-partition
-                            disk-extended-partition
-                            disk-get-max-primary-partition-count
-                            disk-get-partition
-                            disk-get-partition-alignment
-                            disk-get-partition-by-sector
-                            disk-max-partition-length
-                            disk-max-partition-start-sector
-                            disk-minimize-extended-partition
-                            disk-new
-                            disk-new-fresh
-                            disk-partitions
-                            disk-probe
-                            disk-remove-partition
-                            disk-remove-partition*
-                            disk-type-check-feature
-                            disk-type-get
-                            disk-type-get-next
-                            extended-partition?
-                            freespace-partition?
-                            logical-partition?
-                            metadata-partition?
-                            normal-partition?
-                            partition-flag-get-name
-                            partition-flags
-                            partition-get-flag
-                            partition-get-name
-                            partition-get-path
-                            partition-is-flag-available?
-                            partition-new
-                            partition-set-flag
-                            partition-set-name
-                            partition-set-system
-                            partition-type->int
-                            partition-type-get-name)
-  #:autoload (parted exception) (EXCEPTION-OPTION-UNHANDLED
-                                 exception-set-handler)
-  #:autoload (parted filesystem) (filesystem-type-get)
-  #:autoload (parted geom) (geometry-set-end geometry-set-start)
-  #:autoload (parted structs) (device-length
-                               device-model
-                               device-path
-                               device-sector-size
-                               disk-device
-                               disk-disk-type
-                               disk-type-name
-                               filesystem-type-name
-                               geometry-end
-                               geometry-start
-                               partition-disk
-                               partition-end
-                               partition-fs-type
-                               partition-length
-                               partition-length
-                               partition-number
-                               partition-start
-                               partition-type)
-  #:autoload (parted unit) (GIBIBYTE-SIZE
-                            GIGABYTE-SIZE
-                            MEBIBYTE-SIZE
-                            UNIT-GIGABYTE
-                            UNIT-SECTOR
-                            unit-format
-                            unit-format-byte
-                            unit-format-custom
-                            unit-format-custom-byte
-                            unit-parse)
+  #:use-module (parted)
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:use-module (ice-9 regex)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]