guix-patches
[Top][All Lists]
Advanced

[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’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]