[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/13: linux-initrd: Gracefully handle lack of “modules.builtin” file.
From: |
guix-commits |
Subject: |
02/13: linux-initrd: Gracefully handle lack of “modules.builtin” file. |
Date: |
Wed, 17 Apr 2024 06:16:47 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 9f1ef201142e0b3369d55cd486e2d7d7da3a4ed7
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Apr 16 19:18:43 2024 +0200
linux-initrd: Gracefully handle lack of “modules.builtin” file.
Fixes a regression introduced in
8f8ec56052766aa5105d672b77ad9eaca5c1ab3c, whereby passing a “fake”
kernel package would no longer work.
Fixes <https://issues.guix.gnu.org/70239>.
* gnu/system/linux-initrd.scm (flat-linux-module-directory)[build-exp]:
Gracefully handle lack of “modules.builtin” file.
Reported-by: Tomas Volf <~@wolfsden.cz>
Change-Id: I3acf48123b20f0b6a3b9cc0bf22f76cec3e64361
---
gnu/system/linux-initrd.scm | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 561cfe2fd0..40ff2dc808 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -134,18 +134,23 @@ MODULES and taken from LINUX."
(guix build utils)
(rnrs io ports)
(srfi srfi-1)
- (srfi srfi-26))
+ (srfi srfi-26)
+ (ice-9 match))
(define module-dir
(string-append #$linux "/lib/modules"))
(define builtin-modules
- (call-with-input-file
- (first (find-files module-dir "modules.builtin$"))
- (lambda (port)
- (map file-name->module-name
- (string-tokenize
- (get-string-all port))))))
+ (match (find-files module-dir (lambda (file stat)
+ (string=? (basename file)
+ "modules.builtin")))
+ ((file . _)
+ (call-with-input-file file
+ (lambda (port)
+ (map file-name->module-name
+ (string-tokenize (get-string-all port))))))
+ (_
+ '())))
(define modules-to-lookup
(lset-difference string=? '#$modules builtin-modules))
- branch master updated (b47ae1ecc4 -> f594d1bb80), guix-commits, 2024/04/17
- 08/13: gnu: ath9k-htc-firmware: Allow using other targets., guix-commits, 2024/04/17
- 10/13: gnu: cross-binutils: Use binutils-2.33 for ath9k., guix-commits, 2024/04/17
- 04/13: import: github: Recognize more URLs., guix-commits, 2024/04/17
- 01/13: vm: Always use a native emulator in ‘guix system vm’., guix-commits, 2024/04/17
- 03/13: gnu: Add guile-rsv., guix-commits, 2024/04/17
- 02/13: linux-initrd: Gracefully handle lack of “modules.builtin” file.,
guix-commits <=
- 07/13: gnu: ath9k-htc-firmware: Remove binary blobs., guix-commits, 2024/04/17
- 05/13: doc: Add documentation for x86_64-linux-gnux32., guix-commits, 2024/04/17
- 06/13: guix: Add xtensa-ath9k-elf platform., guix-commits, 2024/04/17
- 09/13: gnu: ath9k-htc-firmware: Use xtensa-ath9k-elf., guix-commits, 2024/04/17
- 11/13: gnu: ath9k-htc-firmware: Split package., guix-commits, 2024/04/17
- 12/13: services: Add the Guix Home service., guix-commits, 2024/04/17
- 13/13: doc: Expound on ‘guix-home-service-type’., guix-commits, 2024/04/17