From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) 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 Message-ID: <87bnk0ixn0.fsf@gnu.org> References: <87vbib4w66.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVNjJ-0004Zg-1P for bug-guix@gnu.org; Tue, 10 Mar 2015 13:14:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVNjH-0006KJ-UP for bug-guix@gnu.org; Tue, 10 Mar 2015 13:14:04 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:43333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVNjH-0006KE-Rm for bug-guix@gnu.org; Tue, 10 Mar 2015 13:14:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YVNjH-000511-Mb for bug-guix@gnu.org; Tue, 10 Mar 2015 13:14:03 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <87vbib4w66.fsf@gmail.com> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Sun, 08 Mar 2015 18:32:01 +0800") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 20037-done@debbugs.gnu.org =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > I can reproduce the issue Tom=C3=A1=C5=A1 =C4=8Cech (Sleep_Walker) report= ed at IRC, > but only when reconfigure under 'pre-inst-env' and without 'gnu/system/li= nux.go': Thanks a lot for finding it out, it=E2=80=99s an interesting bug! The problem was that =E2=80=98pam-service->directory=E2=80=99 would get a d= ifferent 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 =E2=80=98delete-duplicates=E2=80=99= on the list of PAM services, thereby using =E2=80=98equal?=E2=80=99 to compare them. B= ut since include gexps, which include closures, =E2=80=98equal?=E2=80= =99 could return #t when running the compiled code (because in effect the gexps in =E2=80=98unix-pam-service=E2=80=99 would not lead to the allocation of fres= h closures at each call, so the gexps would be =E2=80=98eq?=E2=80=99), whereas with the e= valuated code, it would systematically return #f (we get fresh closures at each =E2=80=98unix-pam-service=E2=80=99 call.) Commit 11dddd8 fixes that. Thanks to both of you! Ludo=E2=80=99.