From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eOUDA6G57mFbsAAAgWs5BA (envelope-from ) for ; Mon, 24 Jan 2022 15:37:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aPD4OqC57mEG+gAAauVa8A (envelope-from ) for ; Mon, 24 Jan 2022 15:37:20 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 93E153C18D for ; Mon, 24 Jan 2022 15:37:20 +0100 (CET) Received: from localhost ([::1]:60850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nC0T9-0008En-Li for larch@yhetil.org; Mon, 24 Jan 2022 09:37:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nC0Ss-0008Ef-2T for bug-guix@gnu.org; Mon, 24 Jan 2022 09:37:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nC0Sr-0008AD-Oo for bug-guix@gnu.org; Mon, 24 Jan 2022 09:37:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nC0Sr-0000Dx-Mv for bug-guix@gnu.org; Mon, 24 Jan 2022 09:37:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#53355: guix shell --check: confusing error message Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 24 Jan 2022 14:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53355 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Chris Marusich Received: via spool by 53355-submit@debbugs.gnu.org id=B53355.1643034965794 (code B ref 53355); Mon, 24 Jan 2022 14:37:01 +0000 Received: (at 53355) by debbugs.gnu.org; 24 Jan 2022 14:36:05 +0000 Received: from localhost ([127.0.0.1]:42708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nC0Rw-0000Ck-Lf for submit@debbugs.gnu.org; Mon, 24 Jan 2022 09:36:04 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:49614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nC0Rt-0000CD-MX for 53355@debbugs.gnu.org; Mon, 24 Jan 2022 09:36:02 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 01D8F8B; Mon, 24 Jan 2022 15:35:55 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3Tkdh9TXQt1H; Mon, 24 Jan 2022 15:35:53 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 6E1D22F; Mon, 24 Jan 2022 15:35:53 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87h7a08kub.fsf@gmail.com> Date: Mon, 24 Jan 2022 15:35:52 +0100 In-Reply-To: <87h7a08kub.fsf@gmail.com> (Chris Marusich's message of "Tue, 18 Jan 2022 19:29:00 -0800") Message-ID: <87lez5td4n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: 01D8F8B X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain,text/x-patch]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 53355@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643035040; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=WT6DLtNJyc7kei4JrDV3vNnlqbHrUatf6BY1kYZRxSo=; b=lIMS4NKUCwpRYhGPLSsX45CCXuGftnK2IDXq1RpjfbcwQ/QdHp7/nwWAiS9l3MXI+AluoH BJN/ZZe5fC1EfrRe4T3ZHyDfg1jdzoFqpoViNWE2MsXAOeSrAoOzamZ0jgpVz+doai/J7n xx4HvzerfAd/JVPQ5iAaWP70t6Q46dSLrpBJ2AR7SfsCZ33ny/PvGOivJoQ0AUaTQ7L5Fi jfzJq32IA9TIzBxYoQyOhjaZwhnnCNdfJWWfXF9ET57c6+wXx7vnWiCQWQ7LP73d9poJPb 7lGJEZh3ahkWY8e/VcIMVZeabdc5+fcKYYFwVqxNy1Sfz6AcWPMOCzTyS8LQYQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643035040; a=rsa-sha256; cv=none; b=XqXgw2Ft5sxaXoSq9AszufNE/KREBznjlM2XC3lAaqBhoxj9ylisWjAgNOtmhCnJkGErPq FLqPqgKAD2Fb5ruwyWWRp96uPJo0ctigiB381OTFJnBvFiaWd9aKdE0/lGDGnkqsXI6+Z8 O6j436ScMw1ssKWxdCExnZfm6gMq049uMmKA4IaDMjFG9DCMOP3UM0anL0IXL0AzKkw0+b 0Du20U31kzYpiEAObn7j7OohyuEb25KgJGIztnQMqWKXNDmgRzQN/B27KbAMlzUh7Mo1SS f4RQ4nuQAoPcSBbdHq4Rnrqpiv8aYzNxFPB44WSuw5ZNppYVM7Si9d/S2AbXsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 93E153C18D X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: yac9K8DpRgj9 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Chris, Chris Marusich skribis: > [130] marusich@suzaku:~/guix-master > $ guix shell --container --check -D guix > guix shell: checking the environment variables visible from shell '/bin/b= ash'... > guix shell: warning: variable 'PKG_CONFIG_PATH' is missing from shell env= ironment [...] > 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=E2=80=99s confusing is that =E2=80=98--check=E2=80=99 does the same jo= b whether or not =E2=80=98--container=E2=80=99 is passed: it checks the behavior of your she= ll *outside* a container. I think =E2=80=98--check=E2=80=99 should just do nothing when =E2=80=98--co= ntainer=E2=80=99 is used, possibly emitting a warning saying it=E2=80=99s not doing anything (patch below). Now, the diagnostic is hopefully correct if you use, say, =E2=80=98--pure= =E2=80=99 instead of =E2=80=98--container=E2=80=99. Could you check whether this is = the case? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =C2=A9 2014, 2015, 2018 David Thompson -;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Cour= t=C3=A8s +;;; Copyright =C2=A9 2015-2022 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2018 Mike Gerwitz ;;; ;;; This file is part of GNU Guix. @@ -975,7 +975,10 @@ (define manifest =20 (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 manifes= t)))) =20 (cond ((assoc-ref opts 'search-paths) --=-=-=--