GNU bug report logs - #31089
cgit service: add support for file-like objects

Previous Next

Package: guix-patches;

Reported by: Clément Lassieur <clement <at> lassieur.org>

Date: Sat, 7 Apr 2018 17:05:01 UTC

Severity: normal

Done: Clément Lassieur <clement <at> lassieur.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 31089 <at> debbugs.gnu.org
Subject: [bug#31089] [PATCH 4/5] services: cgit: Enforce serialization order.
Date: Tue, 10 Apr 2018 23:00:22 +0200
Clément Lassieur <clement <at> lassieur.org> skribis:

> This distinguishes fields whose order matters, and makes sure further changes
> won't inadvertently change the order.
>
> * gnu/services/cgit.scm (serialize-cgit-configuration): New procedure that
> serializes fields with a precise order.
> (cgit-activation): Replace the generic SERIALIZE-CONFIGURATION with
> SERIALIZE-CGIT-CONFIGURATION.
> ---
>  gnu/services/cgit.scm | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/services/cgit.scm b/gnu/services/cgit.scm
> index 98e46e0b8..f53306cd3 100644
> --- a/gnu/services/cgit.scm
> +++ b/gnu/services/cgit.scm
> @@ -631,6 +631,17 @@ for cgit to allow access to that repository.")
>     (list '())
>     "Extra options will be appended to cgitrc file."))
>  
> +(define (serialize-cgit-configuration config)
> +  (define (rest? field)
> +    (not (memq (configuration-field-name field)
> +               '(repositories))))
> +  #~(string-append
> +     #$(let ((rest (filter rest? cgit-configuration-fields)))
> +         (serialize-configuration config rest))
> +     #$(serialize-repository-cgit-configuration-list
> +        'repositories
> +        (cgit-configuration-repositories config))))

Please add a comment here explaining the story about field ordering.

OK with this change!

Ludo’.




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

Previous Next


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