GNU bug report logs - #28600
[PATCH] tests: install: Switch to modifying the gc-root-service-type.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Mon, 25 Sep 2017 19:59:01 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Christopher Baines <mail <at> cbaines.net>
Subject: bug#28600: closed (Re: [bug#28600] [PATCH] tests: install: Switch
 to modifying the gc-root-service-type.)
Date: Tue, 26 Sep 2017 08:47:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#28600: [PATCH] tests: install: Switch to modifying the gc-root-service-type.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 28600 <at> debbugs.gnu.org.

-- 
28600: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28600
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: Christopher Baines <mail <at> cbaines.net>
Cc: 28600-done <at> debbugs.gnu.org
Subject: Re: [bug#28600] [PATCH] tests: install: Switch to modifying the
 gc-root-service-type.
Date: Tue, 26 Sep 2017 10:46:02 +0200
Christopher Baines <mail <at> cbaines.net> skribis:

> On Tue, 26 Sep 2017 09:46:10 +0200
> ludo <at> gnu.org (Ludovic Courtès) wrote:

[...]

>> What about:
>> 
>>   (services (cons (simple-service 'extra-root
>>                                   gc-root-service-type roots)
>>                   (operating-system-user-services os)))
>> 
>> This would make sure there’s always a single ‘gc-root-service-type’
>> instance, and we’re just extending it with additional roots, rather
>> than overriding what it does.
>
> That fixes this issue, but I'm not sure what it means for the tests. If
> the roots are not replaced, then the bare-bones-os will be present as
> well as the roots added for each test.

I think it’s OK, because that’s what we want to test: we want to test
the installation image with few modifications compared to what we’re
shipping.

Pushed as 945a8fc240dbc48e3e4e212ef527eadc70231d39.

Now to see if there are still issues?

Thanks!

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] tests: install: Switch to modifying the gc-root-service-type.
Date: Mon, 25 Sep 2017 20:58:10 +0100
Rather than adding the service to the system.

The previous approach is causing the system tests to fail, as the os already
contains a service of type gc-root-service-type, and the way that this service
extends the system-service doesn't compose, causing an error if its added
twice.

  ERROR: In procedure symlink: File exists

* gnu/tests/install.scm (operating-system-with-gc-roots): Modify the existing
  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 _ => roots)))))
 
 
 (define MiB (expt 2 20))
-- 
2.14.1




This bug report was last modified 7 years and 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.