[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/05: linux-initrd: Report only missing modules, not all needed modules
From: |
Ludovic Courtès |
Subject: |
05/05: linux-initrd: Report only missing modules, not all needed modules. |
Date: |
Sun, 29 Jul 2018 12:50:42 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 99b78ba49872bf8a7023bc1ae50e9e0995d0267d
Author: Ludovic Courtès <address@hidden>
Date: Sun Jul 29 18:45:18 2018 +0200
linux-initrd: Report only missing modules, not all needed modules.
Previously the warning would list all the required modules rather than
just those that are missing.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Compute
'missing' and report it.
---
gnu/system/mapped-devices.scm | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm
index 384b1aa..af73dc6 100644
--- a/gnu/system/mapped-devices.scm
+++ b/gnu/system/mapped-devices.scm
@@ -128,15 +128,16 @@ DEVICE must be a \"/dev\" file name."
(const #f)))
(when aliases
- (let ((modules (delete-duplicates
- (append-map (cut matching-modules <> aliases)
- (device-module-aliases device))))
+ (let* ((modules (delete-duplicates
+ (append-map (cut matching-modules <> aliases)
+ (device-module-aliases device))))
- ;; Module names (not file names) are supposed to use underscores
- ;; instead of hyphens. MODULES is a list of module names, whereas
- ;; LINUX-MODULES is file names without '.ko', so normalize them.
- (provided (map file-name->module-name linux-modules)))
- (unless (every (cut member <> provided) modules)
+ ;; Module names (not file names) are supposed to use underscores
+ ;; instead of hyphens. MODULES is a list of module names, whereas
+ ;; LINUX-MODULES is file names without '.ko', so normalize them.
+ (provided (map file-name->module-name linux-modules))
+ (missing (remove (cut member <> provided) modules)))
+ (unless (null? missing)
;; Note: What we suggest here is a list of module names (e.g.,
;; "usb_storage"), not file names (e.g., "usb-storage.ko"). This is
;; OK because we have machinery that accepts both the hyphen and the
@@ -145,7 +146,7 @@ DEVICE must be a \"/dev\" file name."
(&message
(message (format #f (G_ "you may need these modules \
in the initrd for ~a:~{ ~a~}")
- device modules)))
+ device missing)))
(&fix-hint
(hint (format #f (G_ "Try adding them to the
@code{initrd-modules} field of your @code{operating-system} declaration, along
@@ -157,7 +158,7 @@ these lines:
(initrd-modules (append (list~{ ~s~})
%base-initrd-modules)))
@end example\n")
- modules)))
+ missing)))
(&error-location
(location (source-properties->location location)))))))))
- branch master updated (3f8c82e -> 99b78ba), Ludovic Courtès, 2018/07/29
- 01/05: ssh: Display the size of the store items being sent., Ludovic Courtès, 2018/07/29
- 02/05: services: openssh: Add forwarding options., Ludovic Courtès, 2018/07/29
- 03/05: linux-initrd: Improve check of initrd modules., Ludovic Courtès, 2018/07/29
- 05/05: linux-initrd: Report only missing modules, not all needed modules.,
Ludovic Courtès <=
- 04/05: linux-initrd: Try several file names when looking up modules., Ludovic Courtès, 2018/07/29