From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwkaB-0005cF-0D for guix-patches@gnu.org; Tue, 26 Sep 2017 03:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwka6-0001zr-T1 for guix-patches@gnu.org; Tue, 26 Sep 2017 03:47:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50902) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dwka6-0001xe-Oa for guix-patches@gnu.org; Tue, 26 Sep 2017 03:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dwka6-0003xp-5b for guix-patches@gnu.org; Tue, 26 Sep 2017 03:47:02 -0400 Subject: [bug#28600] [PATCH] tests: install: Switch to modifying the gc-root-service-type. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170925195810.26912-1-mail@cbaines.net> Date: Tue, 26 Sep 2017 09:46:10 +0200 In-Reply-To: <20170925195810.26912-1-mail@cbaines.net> (Christopher Baines's message of "Mon, 25 Sep 2017 20:58:10 +0100") Message-ID: <878th13nst.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Christopher Baines Cc: 28600@debbugs.gnu.org Hi! Christopher Baines skribis: > Rather than adding the service to the system. > > The previous approach is causing the system tests to fail, as the os alre= ady > contains a service of type gc-root-service-type, and the way that this se= rvice > extends the system-service doesn't compose, causing an error if its added > twice. > > ERROR: In procedure symlink: File exists Good catch! > * gnu/tests/install.scm (operating-system-with-gc-roots): Modify the exis= ting > gc-root-service, rather than adding another. > --- > gnu/tests/install.scm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm > index 49743860e..28dfc3b8b 100644 > --- a/gnu/tests/install.scm > +++ b/gnu/tests/install.scm > @@ -127,8 +127,9 @@ > "Return a variant of OS where ROOTS are registered as GC roots." > (operating-system > (inherit os) > - (services (cons (service gc-root-service-type roots) > - (operating-system-user-services os))))) > + (services > + (modify-services (operating-system-user-services os) > + (gc-root-service-type _ =3D> roots))))) What about: (services (cons (simple-service 'extra-root gc-root-service-type roots) (operating-system-user-services os))) This would make sure there=E2=80=99s always a single =E2=80=98gc-root-servi= ce-type=E2=80=99 instance, and we=E2=80=99re just extending it with additional roots, rather= than overriding what it does. I can push that if it works for you. Thanks, Ludo=E2=80=99.