GNU bug report logs -
#60582
[PATCH] Properly format list of packages & sync lightdm documentation.
Previous Next
Reported by: Bruno Victal <mirai <at> makinata.eu>
Date: Thu, 5 Jan 2023 21:03:01 UTC
Severity: normal
Tags: patch
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi,
Bruno Victal <mirai <at> makinata.eu> writes:
> * gnu/services/configuration.scm
> (generate-documentation): Format a list of packages by their names.
> ---
> gnu/services/configuration.scm | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm
> index 6b0291dc00..16e2380709 100644
> --- a/gnu/services/configuration.scm
> +++ b/gnu/services/configuration.scm
> @@ -370,6 +370,9 @@ (define (show-default val)
> (cond
> ((package? val)
> (symbol->string (package->symbol val)))
> + ((and ((list-of package?) val) (not (null? val)))
> + (format #f "(~{~a~^ ~})"
> + (map package->symbol val)))
The 'and' and (not (null? val)) don't seem to be necessary as in the
empty list of packages, it'd produce the same as the else clause below:
--8<---------------cut here---------------start------------->8---
scheme@(gnu services configuration)> (format #f "(~{~a~^ ~})" '())
$1 = "()"
scheme@(gnu services configuration)> (str '())
$2 = "()"
--8<---------------cut here---------------end--------------->8---
> (else (str val))))
>
> `(entry (% (heading
--
Thanks,
Maxim
This bug report was last modified 2 years and 158 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.