From: Ivan Kozlov <kanichos@yandex.ru>
To: "41924@debbugs.gnu.org" <41924@debbugs.gnu.org>
Subject: [bug#41924] [PATCH] profiles: Make linux-module-database skip inappropriate inputs
Date: Thu, 18 Jun 2020 00:18:55 +0300 [thread overview]
Message-ID: <182531592428678@mail.yandex.ru> (raw)
In-Reply-To: <169811592419302@mail.yandex.ru>
mkdir should of course be changed to mkdir-p.
17.06.2020, 21:45, "Ivan Kozlov" <kanichos@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
next prev parent reply other threads:[~2020-06-17 21:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-17 18:44 [bug#41924] [PATCH] profiles: Make linux-module-database skip inappropriate inputs Ivan Kozlov
2020-06-17 21:18 ` Ivan Kozlov [this message]
2020-06-18 18:16 ` Danny Milosavljevic
2020-06-19 7:47 ` Ludovic Courtès
2020-06-19 14:23 ` Ivan Kozlov
2020-06-19 20:27 ` bug#41924: " Ludovic Courtès
2020-06-19 8:20 ` [bug#41924] " Ivan Kozlov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=182531592428678@mail.yandex.ru \
--to=kanichos@yandex.ru \
--cc=41924@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.