diff mbox series

[bug#60582,v3,1/2] services: configuration: Format a list of packages by their names.

Message ID 0e6cbfdffea195d739ef180031dc2d6726203e0f.1673645697.git.mirai@makinata.eu
State New
Headers show
Series [bug#60582,v3,1/2] services: configuration: Format a list of packages by their names. | expand

Commit Message

Bruno Victal Jan. 13, 2023, 9:34 p.m. UTC
* gnu/services/configuration.scm
(generate-documentation): Format a list of packages by their names.
---

Simplified condition.

I can't reproduce the issue that was supposed to be resolved by that conditional.
I'm guessing I used to have a different format string back then.

 gnu/services/configuration.scm | 3 +++
 1 file changed, 3 insertions(+)


base-commit: 0f85081ed1d99be57d3544e0307e7fa9ca043be9
diff mbox series

Patch

diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm
index 6b0291dc00..4017cd0fa8 100644
--- a/gnu/services/configuration.scm
+++ b/gnu/services/configuration.scm
@@ -35,6 +35,7 @@  (define-module (gnu services configuration)
   #:autoload   (texinfo serialize) (stexi->texi)
   #:use-module (ice-9 curried-definitions)
   #:use-module (ice-9 match)
+  #:use-module (ice-9 format)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-34)
   #:use-module (srfi srfi-35)
@@ -370,6 +371,8 @@  (define (generate-documentation documentation documentation-name)
                      (cond
                       ((package? val)
                        (symbol->string (package->symbol val)))
+                      (((list-of package?) val)
+                       (format #f "(~{~a~^ ~})" (map package->symbol val)))
                       (else (str val))))
 
                    `(entry (% (heading