宋文武 <iyzs...@gmail.com> 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!

Ludo’.



Reply via email to