From: "Ludovic Courtès" <ludo@gnu.org>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: 53355@debbugs.gnu.org
Subject: bug#53355: guix shell --check: confusing error message
Date: Mon, 24 Jan 2022 15:35:52 +0100 [thread overview]
Message-ID: <87lez5td4n.fsf@gnu.org> (raw)
In-Reply-To: <87h7a08kub.fsf@gmail.com> (Chris Marusich's message of "Tue, 18 Jan 2022 19:29:00 -0800")
[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]
Hi Chris,
Chris Marusich <cmmarusich@gmail.com> skribis:
> [130] marusich@suzaku:~/guix-master
> $ guix shell --container --check -D guix
> guix shell: checking the environment variables visible from shell '/bin/bash'...
> guix shell: warning: variable 'PKG_CONFIG_PATH' is missing from shell environment
[...]
> I found the following things to be confusing:
>
> (1) The error message claims that PKG_CONFIG_PATH is "missing from shell
> environment." However, it seems to be present when I run "env".
>
> (2) It says I can avoid the problem by passing the `--container' option,
> but even when I do that, the problem seems to persist. If that is
> expected behavior, then perhaps the wording should be changed to
> something less certain, such as "you might be able to avoid the
> problem". It does not seem to be the case that I can avoid the problem
> by passing the `--container' option in this case.
What’s confusing is that ‘--check’ does the same job whether or not
‘--container’ is passed: it checks the behavior of your shell *outside*
a container.
I think ‘--check’ should just do nothing when ‘--container’ is used,
possibly emitting a warning saying it’s not doing anything (patch
below).
Now, the diagnostic is hopefully correct if you use, say, ‘--pure’
instead of ‘--container’. Could you check whether this is the case?
Thanks,
Ludo’.
[-- Attachment #2: Type: text/x-patch, Size: 1089 bytes --]
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 510cee727f..ec071402f4 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2018 David Thompson <davet@gnu.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mike Gerwitz <mtg@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -975,7 +975,10 @@ (define manifest
(mwhen (assoc-ref opts 'check?)
(return
- (validate-child-shell-environment profile manifest)))
+ (if container?
+ (warning (G_ "'--check' is unnecessary \
+when using '--container'; doing nothing~%"))
+ (validate-child-shell-environment profile manifest))))
(cond
((assoc-ref opts 'search-paths)
next prev parent reply other threads:[~2022-01-24 14:37 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 3:29 bug#53355: guix shell --check: confusing error message Chris Marusich
2022-01-24 14:35 ` Ludovic Courtès [this message]
2022-01-25 0:55 ` Chris Marusich
2022-01-25 13:39 ` Ludovic Courtès
2022-02-02 7:49 ` bug#51466: " Chris Marusich
2022-02-08 9:26 ` Ludovic Courtès
2022-02-13 23:17 ` Chris Marusich
2022-02-14 9:47 ` Ludovic Courtès
2022-03-08 19:07 ` Ludovic Courtès
2022-05-20 21:37 ` Ludovic Courtès
2022-05-24 4:42 ` Chris Marusich
2022-06-13 10:03 ` Ludovic Courtès
2022-06-19 20:40 ` Chris Marusich
2022-06-20 7:34 ` bug#51466: " Ludovic Courtès
2022-06-20 10:12 ` bug#53355: " bokr
2022-06-20 17:56 ` Bengt Richter
2022-06-20 23:27 ` bug#51466: " Bengt Richter
2022-06-21 4:00 ` Thiago Jung Bauermann via Bug reports for GNU Guix
2022-06-25 9:07 ` Chris Marusich
2022-06-25 9:37 ` bug#53355: bug#51466: " Maxime Devos
2022-06-25 16:52 ` Chris Marusich
2022-06-25 17:40 ` Maxime Devos
2022-06-25 20:06 ` bug#51466: " bokr
2022-06-25 21:04 ` Maxime Devos
2022-06-26 10:33 ` Josselin Poiret via Bug reports for GNU Guix
2022-06-26 13:07 ` Maxime Devos
2022-06-26 19:45 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-06-27 10:17 ` bug#51466: " Ludovic Courtès
2022-06-27 10:34 ` bug#53355: " Maxime Devos
2022-06-28 7:45 ` Ludovic Courtès
2022-06-28 10:38 ` Maxime Devos
2022-06-28 16:57 ` bug#53355: " paren--- via Bug reports for GNU Guix
2022-06-28 17:31 ` bug#51466: " Maxime Devos
2022-07-04 8:11 ` Ludovic Courtès
2022-06-27 11:23 ` bokr
2022-06-27 14:22 ` bug#51466: bug#53355: " Bengt Richter
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=87lez5td4n.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=53355@debbugs.gnu.org \
--cc=cmmarusich@gmail.com \
/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).