[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/09: profiles: 'linux-module-database' hooks gracefully handles module
From: |
guix-commits |
Subject: |
07/09: profiles: 'linux-module-database' hooks gracefully handles module-less kernels. |
Date: |
Thu, 18 Jun 2020 08:49:38 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 05f79da93fb4fd5216feb41510bf0a41f8eedf5b
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Jun 18 14:35:46 2020 +0200
profiles: 'linux-module-database' hooks gracefully handles module-less
kernels.
Fixes <https://bugs.gnu.org/41924>.
* guix/profiles.scm (linux-module-database)[build]: Arrange so
'directory-entries' always returns a list. Add 'match' clause for the
empty list.
Co-authored-by: Ivan Kozlov <kanichos@yandex.ru>
---
guix/profiles.scm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index f7af01b..f34f73e 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1221,9 +1221,10 @@ This is meant to be used as a profile hook."
inputs))
(directory-entries
(lambda (directory)
- (scandir directory
- (lambda (basename)
- (not (string-prefix? "." basename))))))
+ (or (scandir directory
+ (lambda (basename)
+ (not (string-prefix? "." basename))))
+ '())))
;; Note: Should usually result in one entry.
(versions (delete-duplicates
(append-map directory-entries
@@ -1234,6 +1235,10 @@ This is meant to be used as a profile hook."
(setenv "PATH" #+(file-append kmod "/bin"))
(make-linux-module-directory inputs version #$output)
(setenv "PATH" old-path)))
+ (()
+ ;; Nothing here, maybe because this is a kernel with
+ ;; CONFIG_MODULES=n.
+ (mkdir #$output))
(_ (error "Specified Linux kernel and Linux kernel modules
are not all of the same version")))))))
(gexp->derivation "linux-module-database" build
- branch master updated (e418c3d -> 69288a8), guix-commits, 2020/06/18
- 01/09: repl: Fix typo that would lead ~/.guile to be used when running scripts., guix-commits, 2020/06/18
- 03/09: database: 'register-items' takes an open database., guix-commits, 2020/06/18
- 04/09: nar: Avoid opening the database an additional time., guix-commits, 2020/06/18
- 05/09: nar: Use (guix i18n)., guix-commits, 2020/06/18
- 06/09: profiles: Reindent 'linux-module-database'., guix-commits, 2020/06/18
- 08/09: doc: Delete description of a nonexistent option., guix-commits, 2020/06/18
- 02/09: build-system/gnu: Fix 'install' phase of 'gnu-dist'., guix-commits, 2020/06/18
- 07/09: profiles: 'linux-module-database' hooks gracefully handles module-less kernels.,
guix-commits <=
- 09/09: gnu: go-ipfs: Update to 0.5.1., guix-commits, 2020/06/18