unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: 宋文武 <iyzsong@gmail.com>
Cc: 20037-done@debbugs.gnu.org
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	[thread overview]
Message-ID: <87bnk0ixn0.fsf@gnu.org> (raw)
In-Reply-To: <87vbib4w66.fsf@gmail.com> ("宋文武"'s message of "Sun, 08 Mar 2015 18:32:01 +0800")

宋文武 <iyzsong@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	other threads:[~2015-03-10 17:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-08 10:32 bug#20037: 'guix system reconfigure' without 'gnu/system/linux.go' fails with duplicates login pam-service 宋文武
2015-03-10 17:13 ` Ludovic Courtès [this message]
2015-04-02 15:24 ` bug#20037: problem still persist Tomáš Čech
2015-04-05 21:05   ` Ludovic Courtès
2015-04-06 21:06     ` Tomáš Čech

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bnk0ixn0.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=20037-done@debbugs.gnu.org \
    --cc=iyzsong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).