GNU bug report logs - #41924
[PATCH] profiles: Make linux-module-database skip inappropriate inputs

Previous Next

Package: guix-patches;

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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#41924: closed ([PATCH] profiles: Make linux-module-database
 skip inappropriate inputs)
Date: Fri, 19 Jun 2020 20:28:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 19 Jun 2020 22:27:08 +0200
with message-id <87o8peg5sz.fsf <at> gnu.org>
and subject line Re: [bug#41924] [PATCH] profiles: Make linux-module-database skip inappropriate inputs
has caused the debbugs.gnu.org bug report #41924,
regarding [PATCH] profiles: Make linux-module-database skip inappropriate inputs
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
41924: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41924
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ivan Kozlov <kanichos <at> yandex.ru>
To: guix-patches <guix-patches <at> gnu.org>
Subject: [PATCH] profiles: Make linux-module-database skip inappropriate inputs
Date: Wed, 17 Jun 2020 21:44:35 +0300
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




[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Ivan Kozlov <kanichos <at> yandex.ru>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>,
 "41924 <at> debbugs.gnu.org" <41924-done <at> debbugs.gnu.org>
Subject: Re: [bug#41924] [PATCH] profiles: Make linux-module-database skip
 inappropriate inputs
Date: Fri, 19 Jun 2020 22:27:08 +0200
Hi,

Ivan Kozlov <kanichos <at> yandex.ru> skribis:

> Thanks, I’m happy enough with this.

Cool, closing.  Thank you.

Ludo’.


This bug report was last modified 5 years and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.