guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#40430] Don’t attempt to create a module database when none are avai


From: Ludovic Courtès
Subject: [bug#40430] Don’t attempt to create a module database when none are available
Date: Tue, 21 Apr 2020 00:12:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi,

Ivan Kozlov <address@hidden> skribis:

> The present code breaks with a non-modular kernel. This can be easily avoided.
>
> --- a/gnu/system.scm
> +++ #<buffer system.scm>
> @@ -477,13 +477,19 @@
>  value of the SYSTEM-SERVICE-TYPE service."
>    (let ((locale (operating-system-locale-directory os)))
>      (mlet* %store-monad ((kernel -> (operating-system-kernel os))
> +                         (kernel-modules (package-file kernel "lib/modules"))
>                           (modules ->
>                            (operating-system-kernel-loadable-modules os))
> +                         (has-modules ->
> +                          (or (not (null? modules))
> +                              (file-exists? kernel-modules)))
>                           (kernel
>                            (profile-derivation
>                             (packages->manifest
>                              (cons kernel modules))
> -                           #:hooks (list linux-module-database)))
> +                           #:hooks (if has-modules
> +                                       (list linux-module-database)
> +                                       '())))
>                           (initrd -> (operating-system-initrd-file os))
>                           (params    (operating-system-boot-parameters-file 
> os)))
>        (return `(("kernel" ,kernel)

There were a couple of mistakes in this patch (which is fine, we all
make mistakes!), so I reverted it along with explanations:

  
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=71977a6c59460e029c91741c8b11f3a544a70486

What problem were you trying to solve, Ivan?  What do you mean by
“non-modular kernel”?

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]