Hi Oleg,
Oleg Pykhalov <[email protected]> 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 <[email protected]>
+;;; Copyright © 2018, 2019 Ludovic Courtès <[email protected]>
;;; Copyright © 2018 Oleg Pykhalov <[email protected]>
;;;
;;; 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