GNU bug report logs -
#41924
[PATCH] profiles: Make linux-module-database skip inappropriate inputs
Previous Next
Reported by: Ivan Kozlov <kanichos <at> yandex.ru>
Date: Wed, 17 Jun 2020 18:45:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 41924 <at> debbugs.gnu.org (full text, mbox):
mkdir should of course be changed to mkdir-p.
17.06.2020, 21:45, "Ivan Kozlov" <kanichos <at> yandex.ru>:
> This allows a Linux package with CONFIG_MODULES=n, that doesn’t contain the ‘lib/modules’ directory, to be used.
>
> * guix/profiles.scm (linux-module-database): Add if clause to ignore unrelated inputs. Allow empty result.
> ---
> guix/profiles.scm | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/guix/profiles.scm b/guix/profiles.scm
> index 25ff146bdf..a3868e8343 100644
> --- a/guix/profiles.scm
> +++ b/guix/profiles.scm
> @@ -1220,9 +1220,11 @@ This is meant to be used as a profile hook."
> inputs))
> (directory-entries
> (lambda (directory)
> - (scandir directory (lambda (basename)
> - (not
> - (string-prefix? "." basename))))))
> + (if (file-exists? directory)
> + (scandir directory (lambda (basename)
> + (not
> + (string-prefix? "." basename))))
> + '())))
> ;; Note: Should usually result in one entry.
> (versions (delete-duplicates
> (append-map directory-entries
> @@ -1233,6 +1235,8 @@ 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)))
> + ;; Do nothing when there is nothing to do
> + (() (mkdir #$output))
> (_ (error "Specified Linux kernel and Linux kernel modules
> are not all of the same version")))))))
> (gexp->derivation "linux-module-database" build
> --
> 2.26.2
This bug report was last modified 5 years and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.