bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34884: guix describe fails with --format=json and --format=recutils


From: Ricardo Wurmus
Subject: bug#34884: guix describe fails with --format=json and --format=recutils
Date: Mon, 18 Mar 2019 09:45:04 +0100
User-agent: mu4e 1.0; emacs 26.1

Hi,

> Oleg Pykhalov <address@hidden> skribis:
>
>> JSON format:
>>
>> address@hidden ~/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 <address@hidden>
> +;;; Copyright © 2018, 2019 Ludovic Courtès <address@hidden>
>  ;;; Copyright © 2018 Oleg Pykhalov <address@hidden>
>  ;;;
>  ;;; 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






reply via email to

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