[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#33448] [PATCH 1/3] describe: Use a procedure to format output.
From: |
Ludovic Courtès |
Subject: |
[bug#33448] [PATCH 1/3] describe: Use a procedure to format output. |
Date: |
Wed, 21 Nov 2018 22:31:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hi,
Oleg Pykhalov <address@hidden> skribis:
> * guix/channels.scm (channel->sexp): New procedure.
> * guix/scripts/describe.scm (display-checkout-info, display-profile-info): Use
> this.
[...]
> + (define (channels)
s/define (channels)/define channels/ :-)
> + (map (lambda (entry)
> + (match (assq 'source (manifest-entry-properties entry))
> + (('source ('repository ('version 0)
> + ('url url)
> + ('branch branch)
> + ('commit commit)
> + _ ...))
> + (channel (name (string->symbol (manifest-entry-name entry)))
> + (url url)
> + (commit commit)))
> +
> + ;; Pre-0.15.0 Guix does not provide that information,
> + ;; so there's not much we can do in that case.
> + (_ '???)))
Maybe return, say: (channel (name 'guix)(url "?")(commit "?")).
This would avoid weird type errors.
> + (pretty-print (map channel->sexp (channels)))))
I think it should be:
(pretty-print `(list ,@(map channel->sexp channels)))
right?
OK with these changes, thanks!
Ludo’.
- [bug#33448] [PATCH] describe: Fix 'format' option., (continued)
[bug#33448] [PATCH 3/3] describe: Add recutils format., Oleg Pykhalov, 2018/11/21
[bug#33448] [PATCH 1/3] describe: Use a procedure to format output.,
Ludovic Courtès <=