unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Christopher Baines <mail@cbaines.net>
Cc: 28600@debbugs.gnu.org
Subject: [bug#28600] [PATCH] tests: install: Switch to modifying the gc-root-service-type.
Date: Tue, 26 Sep 2017 09:46:10 +0200	[thread overview]
Message-ID: <878th13nst.fsf@gnu.org> (raw)
In-Reply-To: <20170925195810.26912-1-mail@cbaines.net> (Christopher Baines's message of "Mon, 25 Sep 2017 20:58:10 +0100")

Hi!

Christopher Baines <mail@cbaines.net> skribis:

> 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

Good catch!

> * 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)))))

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.

I can push that if it works for you.

Thanks,
Ludo’.

  parent reply	other threads:[~2017-09-26  7:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 19:58 [bug#28600] [PATCH] tests: install: Switch to modifying the gc-root-service-type Christopher Baines
2017-09-25 20:02 ` Christopher Baines
2017-09-26  8:39   ` Ludovic Courtès
2017-09-26  7:46 ` Ludovic Courtès [this message]
2017-09-26  8:00   ` Christopher Baines
2017-09-26  8:46     ` bug#28600: " Ludovic Courtès

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=878th13nst.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=28600@debbugs.gnu.org \
    --cc=mail@cbaines.net \
    /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).