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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ivan Kozlov <kanichos <at> yandex.ru>
Subject: bug#40430: closed (Re: [bug#40430] Don’t
 attempt to create a module database when none are available)
Date: Sat, 04 Apr 2020 20:06:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#40430: Don’t attempt to create a module database when none are available

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 40430 <at> debbugs.gnu.org.

-- 
40430: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40430
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Ivan Kozlov <kanichos <at> yandex.ru>
Cc: 40430-done <at> debbugs.gnu.org
Subject: Re: [bug#40430] Don’t attempt to create a
 module database when none are available
Date: Sat, 4 Apr 2020 22:05:49 +0200
[Message part 3 (text/plain, inline)]
Thanks!

Pushed to guix master as commit b2fff3b5de7d510fe4809e9a97089dddf2a39ffc.

[Message part 4 (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Ivan Kozlov <kanichos <at> yandex.ru>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: Don’t attempt to create a module database when none are available
Date: Sat, 04 Apr 2020 19:16:15 +0300
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)




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.