GNU bug report logs - #33448
[PATCH] describe: Fix 'format' option.

Previous Next

Package: guix-patches;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Tue, 20 Nov 2018 22:27:01 UTC

Severity: normal

Tags: patch

Merged with 33453

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

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: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 33448 <at> debbugs.gnu.org
Subject: [bug#33448] [PATCH 1/3] describe: Use a procedure to format output.
Date: Wed, 21 Nov 2018 22:31:29 +0100
Hi,

Oleg Pykhalov <go.wigust <at> gmail.com> 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’.




This bug report was last modified 6 years and 178 days ago.

Previous Next


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