guix_mirror_bot pushed a commit to branch master
in repository guix.
commit bc115945aa6e582b02264a542698268e6e8abb21
Author: Ludovic Courtès <[email protected]>
AuthorDate: Thu Sep 17 15:44:00 2026 +0200
linux-initrd: ‘base-initrd-modules’ always returns a list.
Previously it would return #f when targeting an unsupported kernel, such as
the Hurd.
* gnu/system/linux-initrd.scm (base-initrd-modules): Return the empty list
when ‘assoc-ref’ returns #f.
Fixes: guix/guix#11279
Reported-by: Yelninei <[email protected]>
Signed-off-by: Ludovic Courtès <[email protected]>
---
gnu/system/linux-initrd.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 6ace2985dae..cce90956a59 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -378,9 +378,10 @@ initrd by default."
(define (modules package)
(assoc-ref (package-properties package) 'base-initrd-modules))
- (assoc-ref (or (modules kernel)
- (modules linux-libre))
- system))
+ (or (assoc-ref (or (modules kernel) (modules linux-libre))
+ system)
+ ;; Either SYSTEM is not supported by KERNEL, or KERNEL is the Hurd.
+ '()))
(define* (base-initrd file-systems
#:key