mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
linux-initrd: Module check correctly handles hyphen vs. underscore.
Fixes <https://bugs.gnu.org/31714>. Reported by Vagrant Cascadian <vagrant@debian.org> and Florian Pelz <pelzflorian@pelzflorian.de>. * gnu/system/mapped-devices.scm (check-device-initrd-modules): Pass LINUX-MODULES through 'normalize-module-name'. * gnu/build/linux-modules.scm (normalize-module-name): Export.
This commit is contained in:
parent
a9a685cc00
commit
411959bef3
2 changed files with 12 additions and 5 deletions
|
@ -32,6 +32,7 @@ (define-module (gnu build linux-modules)
|
|||
ensure-dot-ko
|
||||
module-aliases
|
||||
module-dependencies
|
||||
normalize-module-name
|
||||
recursive-module-dependencies
|
||||
modules-loaded
|
||||
module-loaded?
|
||||
|
|
|
@ -32,7 +32,8 @@ (define-module (gnu system mapped-devices)
|
|||
#:use-module (gnu system uuid)
|
||||
#:autoload (gnu build file-systems) (find-partition-by-luks-uuid)
|
||||
#:autoload (gnu build linux-modules)
|
||||
(device-module-aliases matching-modules known-module-aliases)
|
||||
(device-module-aliases matching-modules known-module-aliases
|
||||
normalize-module-name)
|
||||
#:autoload (gnu packages cryptsetup) (cryptsetup-static)
|
||||
#:autoload (gnu packages linux) (mdadm-static)
|
||||
#:use-module (srfi srfi-1)
|
||||
|
@ -127,10 +128,15 @@ (define aliases
|
|||
(const #f)))
|
||||
|
||||
(when aliases
|
||||
(let ((modules (delete-duplicates
|
||||
(append-map (cut matching-modules <> aliases)
|
||||
(device-module-aliases device)))))
|
||||
(unless (every (cute member <> linux-modules) modules)
|
||||
(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 normalize-module-name linux-modules)))
|
||||
(unless (every (cut member <> provided) modules)
|
||||
(raise (condition
|
||||
(&message
|
||||
(message (format #f (G_ "you may need these modules \
|
||||
|
|
Loading…
Reference in a new issue