[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/49: installer: Use `%' for parameter %run-command-in-installer.
From: |
guix-commits |
Subject: |
14/49: installer: Use `%' for parameter %run-command-in-installer. |
Date: |
Sun, 10 Nov 2024 05:26:23 -0500 (EST) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit 1be6739463b92158f051259176ff078252f44622
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed Oct 16 08:59:13 2024 +0200
installer: Use `%' for parameter %run-command-in-installer.
* gnu/installer/utils.scm (run-command-in-installer): Rename to...
(%run-command-in-installer): ...this.
* gnu/installer.scm (installer-program): Update accordingly.
* gnu/installer/parted.scm (remove-logical-devices,
create-btrfs-file-system,
create-ext4-file-system, create-fat16-file-system, create-fat32-file-system,
create-jfs-file-system, create-ntfs-file-system, create-xfs-file-system,
create-swap-partition, luks-format-and-open, luks-ensure-open, luks-close):
Update accordingly.
Change-Id: I96ebc59ebc85fd8ebccb0cc57130b4e7532d287f
---
gnu/installer.scm | 2 +-
gnu/installer/parted.scm | 27 ++++++++++++++-------------
gnu/installer/utils.scm | 6 +++---
3 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/gnu/installer.scm b/gnu/installer.scm
index 3a05843cab..21809e4259 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -465,7 +465,7 @@ purposes."
(installer-init current-installer)
(lambda ()
(parameterize
- ((run-command-in-installer
+ ((%run-command-in-installer
(installer-run-command current-installer)))
(catch #t
(lambda ()
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index dbdec1bba8..e59df3d8e6 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2019-2020, 2022, 2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2022 Josselin Poiret <dev@jpoiret.xyz>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -363,7 +364,7 @@ fail. See rereadpt function in wipefs.c of util-linux for
an explanation."
(define (remove-logical-devices)
"Remove all active logical devices."
- ((run-command-in-installer) "dmsetup" "remove_all"))
+ ((%run-command-in-installer) "dmsetup" "remove_all"))
(define (installer-root-partition-path)
"Return the root partition path, or #f if it could not be detected."
@@ -1183,7 +1184,7 @@ list and return the updated list."
(define (create-btrfs-file-system partition)
"Create a btrfs file-system for PARTITION file-name."
- ((run-command-in-installer) "mkfs.btrfs" "-f" partition))
+ ((%run-command-in-installer) "mkfs.btrfs" "-f" partition))
(define (create-ext4-file-system partition)
"Create an ext4 file-system for PARTITION file-name."
@@ -1192,32 +1193,32 @@ list and return the updated list."
;; up and adding new files would fail with ENOSPC despite there being plenty
;; of free space and inodes:
;;
<https://blog.merovius.de/posts/2013-10-20-ext4-mysterious-no-space-left-on/>.
- ((run-command-in-installer) "mkfs.ext4" "-F" partition
+ ((%run-command-in-installer) "mkfs.ext4" "-F" partition
"-O" "large_dir"))
(define (create-fat16-file-system partition)
"Create a fat16 file-system for PARTITION file-name."
- ((run-command-in-installer) "mkfs.fat" "-F16" partition))
+ ((%run-command-in-installer) "mkfs.fat" "-F16" partition))
(define (create-fat32-file-system partition)
"Create a fat32 file-system for PARTITION file-name."
- ((run-command-in-installer) "mkfs.fat" "-F32" partition))
+ ((%run-command-in-installer) "mkfs.fat" "-F32" partition))
(define (create-jfs-file-system partition)
"Create a JFS file-system for PARTITION file-name."
- ((run-command-in-installer) "jfs_mkfs" "-f" partition))
+ ((%run-command-in-installer) "jfs_mkfs" "-f" partition))
(define (create-ntfs-file-system partition)
"Create a JFS file-system for PARTITION file-name."
- ((run-command-in-installer) "mkfs.ntfs" "-F" "-f" partition))
+ ((%run-command-in-installer) "mkfs.ntfs" "-F" "-f" partition))
(define (create-xfs-file-system partition)
"Create an XFS file-system for PARTITION file-name."
- ((run-command-in-installer) "mkfs.xfs" "-f" partition))
+ ((%run-command-in-installer) "mkfs.xfs" "-f" partition))
(define (create-swap-partition partition)
"Set up swap area on PARTITION file-name."
- ((run-command-in-installer) "mkswap" "-f" partition))
+ ((%run-command-in-installer) "mkswap" "-f" partition))
(define (call-with-luks-key-file password proc)
"Write PASSWORD in a temporary file and pass it to PROC as argument."
@@ -1246,9 +1247,9 @@ USER-PARTITION if it is encrypted, or the plain file-name
otherwise."
(lambda (key-file)
(installer-log-line "formatting and opening LUKS entry ~s at ~s"
label file-name)
- ((run-command-in-installer) "cryptsetup" "-q" "luksFormat"
+ ((%run-command-in-installer) "cryptsetup" "-q" "luksFormat"
file-name key-file)
- ((run-command-in-installer) "cryptsetup" "open" "--type" "luks"
+ ((%run-command-in-installer) "cryptsetup" "open" "--type" "luks"
"--key-file" key-file file-name label)))))
(define (luks-ensure-open user-partition)
@@ -1262,14 +1263,14 @@ USER-PARTITION if it is encrypted, or the plain
file-name otherwise."
(lambda (key-file)
(installer-log-line "opening LUKS entry ~s at ~s"
label file-name)
- ((run-command-in-installer) "cryptsetup" "open" "--type" "luks"
+ ((%run-command-in-installer) "cryptsetup" "open" "--type" "luks"
"--key-file" key-file file-name label))))))
(define (luks-close user-partition)
"Close the encrypted partition pointed by USER-PARTITION."
(let ((label (user-partition-crypt-label user-partition)))
(installer-log-line "closing LUKS entry ~s" label)
- ((run-command-in-installer) "cryptsetup" "close" label)))
+ ((%run-command-in-installer) "cryptsetup" "close" label)))
(define (format-user-partitions user-partitions)
"Format the <user-partition> records in USER-PARTITIONS list with
diff --git a/gnu/installer/utils.scm b/gnu/installer/utils.scm
index c722e9af8f..170f036537 100644
--- a/gnu/installer/utils.scm
+++ b/gnu/installer/utils.scm
@@ -50,7 +50,7 @@
run-external-command-with-handler/tty
run-external-command-with-line-hooks
run-command
- run-command-in-installer
+ %run-command-in-installer
syslog-port
%syslog-line-hook
@@ -222,13 +222,13 @@ in a pseudoterminal."
(pause)
succeeded?)
-(define run-command-in-installer
+(define %run-command-in-installer
(make-parameter
(lambda (. args)
(raise
(condition
(&serious)
- (&message (message "run-command-in-installer not set")))))))
+ (&message (message "%run-command-in-installer not set")))))))
;;;
- 05/49: system: hurd: Add swap-services to hurd-default-essential-services., (continued)
- 05/49: system: hurd: Add swap-services to hurd-default-essential-services., guix-commits, 2024/11/10
- 01/49: reconfigure: Use native bootloader package for running the installer., guix-commits, 2024/11/10
- 04/49: system: hurd: Remove qemu networking from %base-services/hurd., guix-commits, 2024/11/10
- 06/49: gnu: hurd: Support second boot., guix-commits, 2024/11/10
- 10/49: installer: Remove unused (newt) imports., guix-commits, 2024/11/10
- 08/49: system: examples: Add devel-hurd.tmpl., guix-commits, 2024/11/10
- 09/49: maint: Add installer dependencies to the manifest., guix-commits, 2024/11/10
- 02/49: guix system: When installing the Hurd, create essential devices., guix-commits, 2024/11/10
- 03/49: bootloader: grub: Remove hardcoded partition number for the Hurd., guix-commits, 2024/11/10
- 37/49: gnu: openssl-3.0: Support the 64bit Hurd., guix-commits, 2024/11/10
- 14/49: installer: Use `%' for parameter %run-command-in-installer.,
guix-commits <=
- 18/49: installer: Support dry-run from Guile via store., guix-commits, 2024/11/10
- 16/49: installer: Add "Kernel" page to select the Hurd., guix-commits, 2024/11/10
- 20/49: gnu: gnumach: Update to v1.8+git20240714., guix-commits, 2024/11/10
- 07/49: hurd-boot: Support second boot., guix-commits, 2024/11/10
- 11/49: installer: Align comments., guix-commits, 2024/11/10
- 15/49: installer: Add dry-run?, guix-commits, 2024/11/10
- 35/49: gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd., guix-commits, 2024/11/10
- 23/49: gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd., guix-commits, 2024/11/10
- 13/49: installer: Fix file-name typos., guix-commits, 2024/11/10
- 30/49: gnu: libstdc++: Support the 64bit Hurd., guix-commits, 2024/11/10