unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Pierre Neidhardt <mail@ambrevar.xyz>, 34884@debbugs.gnu.org
Subject: bug#34884: guix describe fails with --format=json and --format=recutils
Date: Mon, 18 Mar 2019 09:45:04 +0100	[thread overview]
Message-ID: <871s34zi3z.fsf@elephly.net> (raw)
In-Reply-To: <87ef75y0es.fsf@gnu.org>


Hi,

> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>
>> JSON format:
>>
>> oleg@guixsd ~/src/guix$ ./pre-inst-env env GUIX_PACKAGE_PATH=$HOME/src/guix-wigust:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist:/tmp/noexist guix describe -p ~/.config/guix/current --format=json
>> [{"name":"guix","url":"https://gitlab.wugi.info/guix/guix.git","commit":"4161deb4549c39b7d4801cc8aa63c365d19fc649"},{"name":"guix-wigust","url":"https://gitlab.wugi.info/guix/guix-wigust.git","commit":"f6dfa5fc08824ebe5bdc42ea35ff0e040245c8c0"}]
>> {"name":"GUIX_PACKAGE_PATH","paths":["/home/oleg/src/guix-wigust","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist","/tmp/noexist"]}
>
> Initially the intent was to warn users that ‘GUIX_PACKAGE_PATH’ is set
> and not captured in the output of ‘guix describe’, because fundamentally
> it cannot be captured reliably.
>
> Thus, what about something as attached instead?
>
> Thanks,
> Ludo’.
>
> diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm
> index 7d0ecb0a4d..b6287d3a4c 100644
> --- a/guix/scripts/describe.scm
> +++ b/guix/scripts/describe.scm
> @@ -1,5 +1,5 @@
>  ;;; GNU Guix --- Functional package management for GNU
> -;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
> +;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
>  ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
> @@ -85,7 +85,9 @@ Display information about the channels currently in use.\n"))
>          (format #t "~%GUIX_PACKAGE_PATH=\"~a\"~%" string))
>         ('channels
>          (format #t (G_ "~%;; warning: GUIX_PACKAGE_PATH=\"~a\"~%")
> -                string))))))
> +                string))
> +       (_
> +        (warning (G_ "'GUIX_PACKAGE_PATH' is set but it is not captured~%")))))))
>  
>  (define (channel->sexp channel)
>    `(channel

This looks good to me!

-- 
Ricardo

      parent reply	other threads:[~2019-03-18  8:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-16 10:12 bug#34884: guix describe fails with --format=json and --format=recutils Pierre Neidhardt
2019-03-16 14:11 ` Oleg Pykhalov
2019-03-17 15:40   ` Ludovic Courtès
2019-03-17 17:40     ` Oleg Pykhalov
2019-03-18  8:52       ` Ludovic Courtès
2019-03-18  8:45     ` Ricardo Wurmus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871s34zi3z.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=34884@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=mail@ambrevar.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).