* [bug#40430] Don’t attempt to create a module database when none are available
@ 2020-04-04 16:16 Ivan Kozlov
2020-04-04 20:05 ` bug#40430: " Danny Milosavljevic
2020-04-20 22:12 ` [bug#40430] " Ludovic Courtès
0 siblings, 2 replies; 4+ messages in thread
From: Ivan Kozlov @ 2020-04-04 16:16 UTC (permalink / raw)
To: 40430
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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#40430: Don’t attempt to create a module database when none are available
2020-04-04 16:16 [bug#40430] Don’t attempt to create a module database when none are available Ivan Kozlov
@ 2020-04-04 20:05 ` Danny Milosavljevic
2020-04-20 22:12 ` [bug#40430] " Ludovic Courtès
1 sibling, 0 replies; 4+ messages in thread
From: Danny Milosavljevic @ 2020-04-04 20:05 UTC (permalink / raw)
To: Ivan Kozlov; +Cc: 40430-done
[-- Attachment #1: Type: text/plain, Size: 88 bytes --]
Thanks!
Pushed to guix master as commit b2fff3b5de7d510fe4809e9a97089dddf2a39ffc.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#40430] Don’t attempt to create a module database when none are available
2020-04-04 16:16 [bug#40430] Don’t attempt to create a module database when none are available Ivan Kozlov
2020-04-04 20:05 ` bug#40430: " Danny Milosavljevic
@ 2020-04-20 22:12 ` Ludovic Courtès
2020-06-12 18:04 ` Ivan Kozlov
1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2020-04-20 22:12 UTC (permalink / raw)
To: Ivan Kozlov; +Cc: Danny Milosavljevic, 40430
Hi,
Ivan Kozlov <kanichos@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’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#40430] Don’t attempt to create a module database when none are available
2020-04-20 22:12 ` [bug#40430] " Ludovic Courtès
@ 2020-06-12 18:04 ` Ivan Kozlov
0 siblings, 0 replies; 4+ messages in thread
From: Ivan Kozlov @ 2020-06-12 18:04 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 40430
The intent was to allow a Linux package with CONFIG_MODULES=n to work after 5c79f238634c5adb6657f1b4b1bb4ddb8bb73ef1. There are no modules and no ‘lib/modules’.
Will you accept a patch that changes linux-module-database to skip unsuitable inputs instead?
21.04.2020, 01:12, "Ludovic Courtès" <ludo@gnu.org>:
> 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’.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-12 18:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 16:16 [bug#40430] Don’t attempt to create a module database when none are available Ivan Kozlov
2020-04-04 20:05 ` bug#40430: " Danny Milosavljevic
2020-04-20 22:12 ` [bug#40430] " Ludovic Courtès
2020-06-12 18:04 ` Ivan Kozlov
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).