[Top][All Lists]

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

bug#20037: 'guix system reconfigure' without 'gnu/system/linux.go' fails

From: Ludovic Courtès
Subject: bug#20037: 'guix system reconfigure' without 'gnu/system/linux.go' fails with duplicates login pam-service
Date: Tue, 10 Mar 2015 18:13:23 +0100
User-agent: 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 
> 'gnu/system/linux.go':

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
‘unix-pam-service’ call.)

Commit 11dddd8 fixes that.

Thanks to both of you!


reply via email to

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