GNU bug report logs - #40430
Don’t attempt to create a module database when none are available

Previous Next

Package: guix-patches;

Reported by: Ivan Kozlov <kanichos <at> yandex.ru>

Date: Sat, 4 Apr 2020 16:17:01 UTC

Severity: normal

Tags: moreinfo

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ivan Kozlov <kanichos <at> yandex.ru>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 40430 <at> debbugs.gnu.org
Subject: [bug#40430] Don’t attempt to create a module database when none are available
Date: Tue, 21 Apr 2020 00:12:40 +0200
Hi,

Ivan Kozlov <kanichos <at> yandex.ru> 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’.




This bug report was last modified 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.