mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
system: Don't compare <pam-service> objects with 'equal?'.
Fixes <http://bugs.gnu.org/20037>. Reported by 宋文武 <iyzsong@gmail.com> 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'.
This commit is contained in:
parent
b9156ccc08
commit
11dddd8a3e
2 changed files with 10 additions and 5 deletions
|
@ -511,9 +511,8 @@ (define (operating-system-etc-directory os)
|
|||
((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)
|
||||
|
|
|
@ -100,13 +100,19 @@ (define (pam-services->directory services)
|
|||
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)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue