[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20037: 'guix system reconfigure' without 'gnu/system/linux.go' fails
bug#20037: 'guix system reconfigure' without 'gnu/system/linux.go' fails with duplicates login pam-service
Tue, 10 Mar 2015 18:13:23 +0100
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
宋文武 <address@hidden> skribis:
> I can reproduce the issue Tomáš Čech (Sleep_Walker) reported at IRC,
> but only when reconfigure under 'pre-inst-env' and without
Thanks a lot for finding it out, it’s an interesting bug!
The problem was that ‘pam-service->directory’ would get a different list
of objects depending on whether (gnu packages linux) is evaluated or
running from bytecode: when evaluated, the list would contain duplicate
services, leading to the build error you reported, but when running from
bytecode, the list is deduplicated.
This is because (gnu system) would call ‘delete-duplicates’ on the list
of PAM services, thereby using ‘equal?’ to compare them. But since
<pam-service> include gexps, which include closures, ‘equal?’ could
return #t when running the compiled code (because in effect the gexps in
‘unix-pam-service’ would not lead to the allocation of fresh closures at
each call, so the gexps would be ‘eq?’), whereas with the evaluated
code, it would systematically return #f (we get fresh closures at each
Commit 11dddd8 fixes that.
Thanks to both of you!