guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: system: Don't compare <pam-service> objects with 'equal?'.


From: Ludovic Courtès
Subject: 01/01: system: Don't compare <pam-service> objects with 'equal?'.
Date: Tue, 10 Mar 2015 17:08:32 +0000

civodul pushed a commit to branch master
in repository guix.

commit 11dddd8a3e559eff21b12db46d993b07b624ab15
Author: Ludovic Courtès <address@hidden>
Date:   Tue Mar 10 18:07:48 2015 +0100

    system: Don't compare <pam-service> objects with 'equal?'.
    
    Fixes <http://bugs.gnu.org/20037>.
    Reported by 宋文武 <address@hidden> and Tomáš Čech.
    
    * gnu/system.scm (operating-system-etc-directory): Remove call to
      'delete-duplicates'.
    * gnu/system/linux.scm (pam-services->directory)[builder]: Add call to
      'delete-duplicates'.
---
 gnu/system.scm       |    5 ++---
 gnu/system/linux.scm |   10 ++++++++--
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index a51b176..1a0aee4 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -511,9 +511,8 @@ export ASPELL_CONF=\"dict-dir 
$HOME/.guix-profile/lib/aspell\"
       ((services     (operating-system-services os))
        (pam-services ->
                      ;; Services known to PAM.
-                     (delete-duplicates
-                      (append (operating-system-pam-services os)
-                              (append-map service-pam-services services))))
+                     (append (operating-system-pam-services os)
+                             (append-map service-pam-services services)))
        (profile-drv (operating-system-profile os))
        (skeletons   (operating-system-skeletons os))
        (/etc/hosts  (or (operating-system-hosts-file os)
diff --git a/gnu/system/linux.scm b/gnu/system/linux.scm
index 8cddedf..aaaa8c6 100644
--- a/gnu/system/linux.scm
+++ b/gnu/system/linux.scm
@@ -100,13 +100,19 @@ dumped in /etc/pam.d/NAME, where NAME is the name of 
SERVICE."
                              services))))
     (define builder
       #~(begin
-          (use-modules (ice-9 match))
+          (use-modules (ice-9 match)
+                       (srfi srfi-1))
 
           (mkdir #$output)
           (for-each (match-lambda
                      ((name file)
                       (symlink file (string-append #$output "/" name))))
-                    '#$(zip names files))))
+
+                    ;; Since <pam-service> objects cannot be compared with
+                    ;; 'equal?' since they contain gexps, which contain
+                    ;; closures, use 'delete-duplicates' on the build-side
+                    ;; instead.  See <http://bugs.gnu.org/20037>.
+                    (delete-duplicates '#$(zip names files)))))
 
     (gexp->derivation "pam.d" builder)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]