GNU bug report logs - #53355
guix shell --check: confusing error message

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Chris Marusich <cmmarusich@HIDDEN>; Keywords: moreinfo; merged with #51466; dated Wed, 19 Jan 2022 03:30:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 53355 <at> debbugs.gnu.org:


Received: (at 53355) by debbugs.gnu.org; 20 May 2022 21:37:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 20 17:37:13 2022
Received: from localhost ([127.0.0.1]:40232 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nsAJ7-0003JE-BM
	for submit <at> debbugs.gnu.org; Fri, 20 May 2022 17:37:13 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49114)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1nsAJ2-0003Iu-Q3; Fri, 20 May 2022 17:37:12 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36986)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1nsAIx-0000tB-I0; Fri, 20 May 2022 17:37:03 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=LoiQClw0DtGGGsv/FJeKsbt4/buWO5r2aXfPbQIanGg=; b=Gpp8JA3QtrQ+6dDkzuhu
 O/ZUv4IgyiZtzgB5NgG8i1hoK1F1jg59EMiWdxfD0dsU00Ka4NP/DL5QAmuA9CW8bGurpI7K6rtqE
 76+Xv94wB7BDlbWjLGNbhgu+Bj83AsYqfqZBgKjZPahyeNW0LGCDIGK6IUPZ7dUIVmLxWyn/tn7W/
 r3LV5J+nwNSWpAYVKb4Gmaa73iFBSQj/erxjuPmRg4bQaeLIloo2ux2STnxICIGR545UeDA3CLRn/
 pO8sVEs11dZY93aXSZmxCYRYWJnc28Jx1oXLhU29u7dTHGC8wBmxJjyZXTF4HiNw5RcsUjzt2XoML
 WhFj/swpQLVEUQ==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:49206
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1nsAIx-00016h-4n; Fri, 20 May 2022 17:37:03 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Chris Marusich <cmmarusich@HIDDEN>
Subject: Re: bug#53355: guix shell --check: confusing error message
References: <87h7a08kub.fsf@HIDDEN> <87lez5td4n.fsf@HIDDEN>
 <87sftc4osu.fsf@HIDDEN> <87h79slysd.fsf@HIDDEN>
 <87sft13dyv.fsf@HIDDEN> <874k59d802.fsf@HIDDEN>
 <87wnhy2w73.fsf_-_@HIDDEN> <878rudzsmv.fsf@HIDDEN>
 <87ilso461i.fsf_-_@HIDDEN>
Date: Fri, 20 May 2022 23:37:01 +0200
In-Reply-To: <87ilso461i.fsf_-_@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s?=
 =?utf-8?Q?=22's?= message of "Tue, 08 Mar 2022 20:07:21 +0100")
Message-ID: <8735h3x4w2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 53355
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Chris,

A friendly ping.  :-)

Ludo=E2=80=99.

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> Hi Chris,
>
> Did you have a chance to look into it?
>
>   https://issues.guix.gnu.org/53355
>
> TIA.  :-)
>
> Ludo=E2=80=99.
>
> Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:
>
>> Hi Chris,
>>
>> Thanks for debugging this!
>>
>> Chris Marusich <cmmarusich@HIDDEN> skribis:
>>
>>> From c3eea81846ae71a246e6b592be74062f4bf26474 Mon Sep 17 00:00:00 2001
>>> From: Chris Marusich <cmmarusich@HIDDEN>
>>> Date: Sun, 13 Feb 2022 14:15:14 -0800
>>> Subject: [PATCH] environment: Prevent PS1 from clobbering output in 'ch=
eck'.
>>>
>>> Fixes: <https://issues.guix.gnu.org/51466>.
>>>
>>> * guix/scripts/environment.scm (child-shell-environment): In the script
>>> executed the child shell, set PS1 to an empty value and then echo three
>>> sentinel lines to try to "flush" the original PS1 value before printing=
 the
>>> environment variables.  In the parent process, read and discard all lin=
es up
>>> to and including the last sentinel line.  After that, read the remainin=
g lines
>>> as usual.
>>
>> [...]
>>
>>> +    ;; Why print "GUIX_FLUSH" a few times?  We are trying to "flush" t=
he
>>> +    ;; original PS1 value to the port so we can read it (and discard i=
t)
>>> +    ;; before we start reading the environment variables from the port=
.  If we
>>> +    ;; don't do this, the original PS1 value can sometimes get interle=
aved
>>> +    ;; into the output, which interferes with our parsing logic.  It's=
 a hack,
>>> +    ;; but in practice it seems to do the job.  If you know of a more =
graceful
>>> +    ;; solution, please implement it!  See: https://issues.guix.gnu.or=
g/51466
>>> +    "PS1=3D; for i in 1 2 3; do echo GUIX_FLUSH_$i; done; \
>>> +env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\n")
>>
>> So you confirm that a single =E2=80=9Cecho=E2=80=9D is not enough, right?
>>
>> Perhaps we should unroll the =E2=80=98for=E2=80=99 loop for portability,=
 to be on the
>> safe side.  Initially I tested with Bash, Zsh, and Fish:
>>
>>   https://issues.guix.gnu.org/51285#0-lineno49
>>
>> I think Fish has a very non-POSIX syntax, hence the suggestion to avoid
>> =E2=80=98for=E2=80=99.
>>
>> I realized that setting PS1 could interfere with the logic below that
>> checks for PS1.  And since it doesn=E2=80=99t seem to help, perhaps we c=
an
>> remove =E2=80=9CPS1=3D;=E2=80=9D?
>>
>> Thoughts?
>>
>> Sorry to answer with yet more questions!
>>
>> Thanks,
>> Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#53355; Package guix. Full text available.

Message received at 53355 <at> debbugs.gnu.org:


Received: (at 53355) by debbugs.gnu.org; 8 Mar 2022 19:07:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 08 14:07:33 2022
Received: from localhost ([127.0.0.1]:57950 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nRfBE-000405-OJ
	for submit <at> debbugs.gnu.org; Tue, 08 Mar 2022 14:07:33 -0500
Received: from eggs.gnu.org ([209.51.188.92]:43640)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1nRfBD-0003zo-5V; Tue, 08 Mar 2022 14:07:31 -0500
Received: from [2001:470:142:3::e] (port=43956 helo=fencepost.gnu.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1nRfB7-0002gJ-Uf; Tue, 08 Mar 2022 14:07:25 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=gIMcQZTk4tANSlYXDYlIuIGOZoc6mjjqqpjcBQjwfjg=; b=lSB30T2tKpYe+LaZ11Li
 HfMkG1yNF4evjI3PI0lHwfTXtqkmLKowllZRFm1/vSoLYLSVUWBN0zqehuJ049ibqyEffLc+Ch4oj
 ojLhiNQWy12Wfiq5D6A5+uIo7N0X9fVfqBKqTi75A7h/MzWN8NSeOpeheD3QRj2pQzTXjux/wucR4
 9Nzilr2Jp7Pnb3GuEQEjw0ZyvQQohZKJQnZE+aGv3OGdGHiPz/E7z/PUt5ZJ39AwnITnzUCo5Duqa
 uhC7cYfbYzu9M+kAtct1l8I2PAHusjXqI8Ilpy4xMHbHpAZmPacI1jkURol+KsxqbgoIblPmY9sy5
 jlUn/e+oStM9cA==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:49420
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1nRfB6-0003Td-0s; Tue, 08 Mar 2022 14:07:25 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Chris Marusich <cmmarusich@HIDDEN>
Subject: Re: bug#53355: guix shell --check: confusing error message
References: <87h7a08kub.fsf@HIDDEN> <87lez5td4n.fsf@HIDDEN>
 <87sftc4osu.fsf@HIDDEN> <87h79slysd.fsf@HIDDEN>
 <87sft13dyv.fsf@HIDDEN> <874k59d802.fsf@HIDDEN>
 <87wnhy2w73.fsf_-_@HIDDEN> <878rudzsmv.fsf@HIDDEN>
Date: Tue, 08 Mar 2022 20:07:21 +0100
In-Reply-To: <878rudzsmv.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Mon, 14 Feb 2022 10:47:52 +0100")
Message-ID: <87ilso461i.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 53355
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Chris,

Did you have a chance to look into it?

  https://issues.guix.gnu.org/53355

TIA.  :-)

Ludo=E2=80=99.

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> Hi Chris,
>
> Thanks for debugging this!
>
> Chris Marusich <cmmarusich@HIDDEN> skribis:
>
>> From c3eea81846ae71a246e6b592be74062f4bf26474 Mon Sep 17 00:00:00 2001
>> From: Chris Marusich <cmmarusich@HIDDEN>
>> Date: Sun, 13 Feb 2022 14:15:14 -0800
>> Subject: [PATCH] environment: Prevent PS1 from clobbering output in 'che=
ck'.
>>
>> Fixes: <https://issues.guix.gnu.org/51466>.
>>
>> * guix/scripts/environment.scm (child-shell-environment): In the script
>> executed the child shell, set PS1 to an empty value and then echo three
>> sentinel lines to try to "flush" the original PS1 value before printing =
the
>> environment variables.  In the parent process, read and discard all line=
s up
>> to and including the last sentinel line.  After that, read the remaining=
 lines
>> as usual.
>
> [...]
>
>> +    ;; Why print "GUIX_FLUSH" a few times?  We are trying to "flush" the
>> +    ;; original PS1 value to the port so we can read it (and discard it)
>> +    ;; before we start reading the environment variables from the port.=
  If we
>> +    ;; don't do this, the original PS1 value can sometimes get interlea=
ved
>> +    ;; into the output, which interferes with our parsing logic.  It's =
a hack,
>> +    ;; but in practice it seems to do the job.  If you know of a more g=
raceful
>> +    ;; solution, please implement it!  See: https://issues.guix.gnu.org=
/51466
>> +    "PS1=3D; for i in 1 2 3; do echo GUIX_FLUSH_$i; done; \
>> +env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\n")
>
> So you confirm that a single =E2=80=9Cecho=E2=80=9D is not enough, right?
>
> Perhaps we should unroll the =E2=80=98for=E2=80=99 loop for portability, =
to be on the
> safe side.  Initially I tested with Bash, Zsh, and Fish:
>
>   https://issues.guix.gnu.org/51285#0-lineno49
>
> I think Fish has a very non-POSIX syntax, hence the suggestion to avoid
> =E2=80=98for=E2=80=99.
>
> I realized that setting PS1 could interfere with the logic below that
> checks for PS1.  And since it doesn=E2=80=99t seem to help, perhaps we can
> remove =E2=80=9CPS1=3D;=E2=80=9D?
>
> Thoughts?
>
> Sorry to answer with yet more questions!
>
> Thanks,
> Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#53355; Package guix. Full text available.
Merged 51466 53355. Request was from Chris Marusich <cmmarusich@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 53355 <at> debbugs.gnu.org:


Received: (at 53355) by debbugs.gnu.org; 25 Jan 2022 13:39:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 25 08:39:59 2022
Received: from localhost ([127.0.0.1]:47452 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nCM3D-0003Iq-IJ
	for submit <at> debbugs.gnu.org; Tue, 25 Jan 2022 08:39:59 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:56174)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1nCM38-0003IX-GL
 for 53355 <at> debbugs.gnu.org; Tue, 25 Jan 2022 08:39:57 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id E62808B;
 Tue, 25 Jan 2022 14:39:47 +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 S1_bmFgNXHNm; Tue, 25 Jan 2022 14:39:47 +0100 (CET)
Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id BE2E45B3;
 Tue, 25 Jan 2022 14:39:46 +0100 (CET)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Chris Marusich <cmmarusich@HIDDEN>
Subject: Re: bug#53355: guix shell --check: confusing error message
References: <87h7a08kub.fsf@HIDDEN> <87lez5td4n.fsf@HIDDEN>
 <87sftc4osu.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 6 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 25 Jan 2022 14:39:46 +0100
In-Reply-To: <87sftc4osu.fsf@HIDDEN> (Chris Marusich's message of "Mon, 24
 Jan 2022 16:55:13 -0800")
Message-ID: <87h79slysd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spamd-Bar: /
Authentication-Results: hera.aquilenet.fr;
	none
X-Rspamd-Server: hera
X-Rspamd-Queue-Id: E62808B
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)[text/plain];
 RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];
 RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[];
 MID_RHS_MATCH_FROM(0.00)[]
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 53355
Cc: 53355 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi Chris,

Chris Marusich <cmmarusich@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>
>> What=E2=80=99s confusing is that =E2=80=98--check=E2=80=99 does the same=
 job whether or not
>> =E2=80=98--container=E2=80=99 is passed: it checks the behavior of your =
shell *outside*
>> a container.
>>
>> I think =E2=80=98--check=E2=80=99 should just do nothing when =E2=80=98-=
-container=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--pur=
e=E2=80=99
>> instead of =E2=80=98--container=E2=80=99.  Could you check whether this =
is the case?
>
> That sounds reasonable.  I tested your patch.  It now correctly emits a
> warning when both --container and --check are provided.

Great, I=E2=80=99ll commit it.

> First, I tried without --pure or --container.  Below, you can see that
> it claims LIBRARY_PATH is missing, but it does not seem to be missing:

[...]

> Next, I tried with --pure and --check - once again, it claims
> LIBRARY_PATH is missing, even though it does not seem to be missing:

It looks like the shell-check machinery is misdiagnosing things, as
Vagrant reported in <https://issues.guix.gnu.org/51466> (is this on
Debian too?).

Could you try the debugging tricks I proposed there?

TIA,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#53355; Package guix. Full text available.

Message received at 53355 <at> debbugs.gnu.org:


Received: (at 53355) by debbugs.gnu.org; 25 Jan 2022 00:55:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 24 19:55:28 2022
Received: from localhost ([127.0.0.1]:46385 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nCA7M-0004ft-3a
	for submit <at> debbugs.gnu.org; Mon, 24 Jan 2022 19:55:28 -0500
Received: from mail-pj1-f51.google.com ([209.85.216.51]:45969)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cmmarusich@HIDDEN>) id 1nCA7I-0004fc-U7
 for 53355 <at> debbugs.gnu.org; Mon, 24 Jan 2022 19:55:26 -0500
Received: by mail-pj1-f51.google.com with SMTP id
 g9-20020a17090a67c900b001b4f1d71e4fso961085pjm.4
 for <53355 <at> debbugs.gnu.org>; Mon, 24 Jan 2022 16:55:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=kBgnGXJa0g99/TSVkZtiLw734rVKgTXx8d+VWXaWCzw=;
 b=dO1Hzgv6rXxjzQzJ6EXSwxgPo7PnxBHxJCoGE8rDvHnz1yBiVLFxQ3fT5eVTLUo6+g
 NnYSbEIPWKM4/kVGEkYAljGrXvpAtrrlzzFkIXzwFu8FboGmRphcmbN/7RW27vW6mRAm
 d78AAkJAj9VpvEOXktswotM1rnCB3KXrPG7hlmuVrnif8JuRj9EKWjnjOXb3YwSOTQHY
 exf7OOS0kP6F3W9n8pfAkqqiBTy11+dHHl2ijsd0xv8XVJT2jWTYwQSv8z4YLtpwaX5R
 zPzcGVaYsfxkbJcsryqbkfs9zwXvqaBumTAyqscjBmwMMmLcX7MPiIi/zZWRd6eIagHM
 fC5g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=kBgnGXJa0g99/TSVkZtiLw734rVKgTXx8d+VWXaWCzw=;
 b=oRBkW7rq8rCFjv8RSI8gY1714VtQcENBHCNKeLsBnAiDyaIIlHNI3Tg7M3bLXbp2s1
 ywF6xLiVDM3hd35kMHMqRN6Ob3EBGsZFqXjXWbft10gTLUXJJ7BERKkgfmfooiHOR6QU
 4B5AIH9QDB0DxV1Zd4tKbzRHI+P/dgof+XZU2FURJTDn/OJDDQUuQGW7IN0VZ0WQ549F
 e8FZwnJFkpr1zdSe1cxJOX5Lhr8YWa4KS05pQKIWMjpZiJE5VboYki8i4b5LY0iu9zg4
 CufOZoP09PhLh4JBj7XN5MJn5BllKD1PBunTiv9fgu8f5jAg9neWtetWwOT0gwJjy01k
 Sb/g==
X-Gm-Message-State: AOAM53232IR5lJ23q11wCQDIcVtYlIOILuGgPuYriHhOOmBthxo4VMGc
 TbLsIDRsMr1TZtkFf2NPs8+H7X8tFVA=
X-Google-Smtp-Source: ABdhPJyeH89yEPZM77obDvD8zqEz/NkWu8RdiWLZH6Ts9aAtrtmdmIW8y4t6JL0t/taYRmQe+qQNKg==
X-Received: by 2002:a17:90b:4b83:: with SMTP id
 lr3mr959958pjb.42.1643072118426; 
 Mon, 24 Jan 2022 16:55:18 -0800 (PST)
Received: from garuda-lan (c-71-231-157-28.hsd1.wa.comcast.net.
 [71.231.157.28])
 by smtp.gmail.com with ESMTPSA id h10sm17614201pfc.103.2022.01.24.16.55.17
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 24 Jan 2022 16:55:17 -0800 (PST)
From: Chris Marusich <cmmarusich@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#53355: guix shell --check: confusing error message
References: <87h7a08kub.fsf@HIDDEN> <87lez5td4n.fsf@HIDDEN>
Date: Mon, 24 Jan 2022 16:55:13 -0800
In-Reply-To: <87lez5td4n.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Mon, 24 Jan 2022 15:35:52 +0100")
Message-ID: <87sftc4osu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 53355
Cc: 53355 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Ludo,

Thank you for the response!

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> What=E2=80=99s confusing is that =E2=80=98--check=E2=80=99 does the same =
job whether or not
> =E2=80=98--container=E2=80=99 is passed: it checks the behavior of your s=
hell *outside*
> a container.
>
> I think =E2=80=98--check=E2=80=99 should just do nothing when =E2=80=98--=
container=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 i=
s the case?

That sounds reasonable.  I tested your patch.  It now correctly emits a
warning when both --container and --check are provided.  However, I now
see that the issue occurs even when --container is omitted.  So it seems
like something else might be going on.

Below, I'll provide details of what I did to test your patch.

In one test, I committed your change locally and did "guix pull" to
install the patched Guix into ~/tmpguixprofile.  I then tried using it:

=2D-8<---------------cut here---------------start------------->8---
[0] marusich@suzaku:~/guix-master
$ env -i bash
[0] marusich@suzaku:/home/marusich/guix-master
$ activate-profile ~/tmpguixprofile
[0] marusich@suzaku:/home/marusich/guix-master
$ which guix
/home/marusich/tmpguixprofile/bin/guix
=2D-8<---------------cut here---------------end--------------->8---

First, I tried without --pure or --container.  Below, you can see that
it claims LIBRARY_PATH is missing, but it does not seem to be missing:

=2D-8<---------------cut here---------------start------------->8---
[0] marusich@suzaku:/home/marusich/guix-master
$ guix shell --check -D guix
guix shell: checking the environment variables visible from shell '/bin/sh'=
...
guix shell: warning: variable 'LIBRARY_PATH' is missing from shell environm=
ent
hint: One or more environment variables have a different value in the shell=
 than
the one we set.  This means that you may find yourself running code in an
environment different from the one you asked Guix to prepare.

This usually indicates that your shell startup files are unexpectedly
modifying those environment variables.  For example, if you are using Bash,
make sure that environment variables are set or modified in
`~/.bash_profile' and _not_ in `~/.bashrc'.  For more information on Bash
startup files, run:

     info "(bash) Bash Startup Files"

Alternatively, you can avoid the problem by passing the `--container' or
`-C' option.  That will give you a fully isolated environment running in a
"container", immune to the issue described above.

[1] marusich@suzaku:/home/marusich/guix-master
$ env | grep LIBRARY_PATH
[1] marusich@suzaku:/home/marusich/guix-master
$ guix shell -D guix
[0] \u@\H:\w\n$ env | grep LIBRARY_PATH
LIBRARY_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib
=2D-8<---------------cut here---------------end--------------->8---

Next, I tried with --container - you can see it works as intended:

=2D-8<---------------cut here---------------start------------->8---
[0] marusich@suzaku:/home/marusich/guix-master
$ guix shell --container --check -D guix
guix shell: warning: '--check' is unnecessary when using '--container'; doi=
ng nothing
=2D-8<---------------cut here---------------end--------------->8---

Next, I tried with --pure and --check - once again, it claims
LIBRARY_PATH is missing, even though it does not seem to be missing:

=2D-8<---------------cut here---------------start------------->8---
[0] marusich@suzaku:/home/marusich/guix-master
$ guix shell --pure --check -D guix
guix shell: checking the environment variables visible from shell '/bin/sh'=
...
guix shell: warning: variable 'LIBRARY_PATH' is missing from shell environm=
ent
hint: One or more environment variables have a different value in the shell=
 than
the one we set.  This means that you may find yourself running code in an
environment different from the one you asked Guix to prepare.

This usually indicates that your shell startup files are unexpectedly
modifying those environment variables.  For example, if you are using Bash,
make sure that environment variables are set or modified in
`~/.bash_profile' and _not_ in `~/.bashrc'.  For more information on Bash
startup files, run:

     info "(bash) Bash Startup Files"

Alternatively, you can avoid the problem by passing the `--container' or
`-C' option.  That will give you a fully isolated environment running in a
"container", immune to the issue described above.

[1] marusich@suzaku:/home/marusich/guix-master
$ env | grep LIBRARY_PATH
[1] marusich@suzaku:/home/marusich/guix-master
$ guix shell --pure -D guix
$ env | grep LIBRARY_PATH
LIBRARY_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib
=2D-8<---------------cut here---------------end--------------->8---

A similar error message occurs if I try the same steps from a checkout
using pre-inst-env.  However, in that case the offending environment
variable is different (PKG_CONFIG_PATH in this case):

=2D-8<---------------cut here---------------start------------->8---
[0] marusich@suzaku:~/guix-master
$ guix environment guix
[0] [env] marusich@suzaku:~/guix-master
$ ./pre-inst-env guix shell --check -D guix -- bash -c 'echo in env, PKG_CO=
NFIG_PATH=3D"$PKG_CONFIG_PATH"'
guix shell: checking the environment variables visible from shell '/bin/bas=
h'...
guix shell: warning: variable 'PKG_CONFIG_PATH' is missing from shell envir=
onment
hint: One or more environment variables have a different value in the shell=
 than
the one we set.  This means that you may find yourself running code in an
environment different from the one you asked Guix to prepare.

This usually indicates that your shell startup files are unexpectedly
modifying those environment variables.  For example, if you are using Bash,
make sure that environment variables are set or modified in
`~/.bash_profile' and _not_ in `~/.bashrc'.  For more information on Bash
startup files, run:

     info "(bash) Bash Startup Files"

Alternatively, you can avoid the problem by passing the `--container' or
`-C' option.  That will give you a fully isolated environment running in a
"container", immune to the issue described above.

[1] [env] marusich@suzaku:~/guix-master
$ ./pre-inst-env guix shell --check --pure -D guix -- bash -c 'echo in env,=
 PKG_CONFIG_PATH=3D"$PKG_CONFIG_PATH"'
guix shell: checking the environment variables visible from shell '/bin/bas=
h'...
guix shell: warning: variable 'PKG_CONFIG_PATH' is missing from shell envir=
onment
hint: One or more environment variables have a different value in the shell=
 than
the one we set.  This means that you may find yourself running code in an
environment different from the one you asked Guix to prepare.

This usually indicates that your shell startup files are unexpectedly
modifying those environment variables.  For example, if you are using Bash,
make sure that environment variables are set or modified in
`~/.bash_profile' and _not_ in `~/.bashrc'.  For more information on Bash
startup files, run:

     info "(bash) Bash Startup Files"

Alternatively, you can avoid the problem by passing the `--container' or
`-C' option.  That will give you a fully isolated environment running in a
"container", immune to the issue described above.

[1] [env] marusich@suzaku:~/guix-master
$ ./pre-inst-env guix shell --check --container -D guix -- bash -c 'echo in=
 env, PKG_CONFIG_PATH=3D"$PKG_CONFIG_PATH"'
guix shell: warning: '--check' is unnecessary when using '--container'; doi=
ng nothing
in env, PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi=
le/lib/pkgconfig
[0] [env] marusich@suzaku:~/guix-master
$ ./pre-inst-env guix shell -D guix -- bash -c 'echo in env, PKG_CONFIG_PAT=
H=3D"$PKG_CONFIG_PATH"'
in env, PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi=
le/lib/pkgconfig:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib/pk=
gconfig
[0] [env] marusich@suzaku:~/guix-master
$ ./pre-inst-env guix shell --pure -D guix -- bash -c 'echo in env, PKG_CON=
FIG_PATH=3D"$PKG_CONFIG_PATH"'
in env, PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi=
le/lib/pkgconfig
[0] [env] marusich@suzaku:~/guix-master
$ ./pre-inst-env guix shell --container -D guix -- bash -c 'echo in env, PK=
G_CONFIG_PATH=3D"$PKG_CONFIG_PATH"'
in env, PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi=
le/lib/pkgconfig
[0] [env] marusich@suzaku:~/guix-master
$ echo out of env, PKG_CONFIG_PATH=3D"$PKG_CONFIG_PATH"
out of env, PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-p=
rofile/lib/pkgconfig
[0] [env] marusich@suzaku:~/guix-master
$
=2D-8<---------------cut here---------------end--------------->8---

It seems this issue happens regardless of whether I use pre-inst-env or
run Guix from a "guix pull" installation.

=2D-=20
Chris

PGP: https://savannah.gnu.org/people/viewgpg.php?user_id=3D106836

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmHvSnEVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkad4AQP/1qZY+j1OLqPK4vjC1ij47bnArpM
JlXENik81qBkJZmpPiH3O24xylMoUJ/zQOwdLwnBL8pdpkt2Y+4NzwuLwKUqKoOf
djbeWuD0UwdWHC9ICi489mOb51YlZT5lTp98tqrbjuiqAEo72OtcFr9LpV4wQk6n
WJ35q0wbhyom73uwCGKNj08+bwaM+74Jt5Y0V/k+RlppEF7QP9wzK6JWWFYKsNQw
nlKuwAOZGYfPSXOJGMy8Rtgiqc//UEQaho3qdW1ZdLM+XmL9iydHfwVTGUf2QVVT
RSf9Os1lTp+XxjPtsa3Q4uwTTRKSkpwNLsMDqVOoDnBtjNSqayIkVtfkMKD9uMKu
6k+1+y0dPUK04yIxVuPryZ1H4qStaU+Fd0V174s5gDEt5ujGaTUgMLc/Om/HBSdw
nTD8WKQX0cFZaOUCUZpfRYFUlJdXS4QloaHErg2T5Nl0InVk3SpkPsHf7e2hO/tK
Hmc5nr0XrHz7G9Wz44Y1GGjeVcsyWFejh1kR+n8WBvF4TW4+ohdrFsWxe0NCyNCl
BlG2juHRV+INYy8MlItge4FInY/an4XcdaXEwWjMOb8+Md+K2gxCdDAewhMQP8pb
XES4PyifT/ncCcfQ3BHox3PpuT8MVlL/0/zUaBgjR2xTCcQQIetJn9D+EHa8rhQv
rrGPp0GLc3mueS6R
=wlPY
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#53355; Package guix. Full text available.

Message received at 53355 <at> debbugs.gnu.org:


Received: (at 53355) by debbugs.gnu.org; 24 Jan 2022 14:36:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 24 09:36:04 2022
Received: from localhost ([127.0.0.1]:42708 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nC0Rw-0000Ck-Lf
	for submit <at> 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 <ludo@HIDDEN>) id 1nC0Rt-0000CD-MX
 for 53355 <at> 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: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Chris Marusich <cmmarusich@HIDDEN>
Subject: Re: bug#53355: guix shell --check: confusing error message
References: <87h7a08kub.fsf@HIDDEN>
Date: Mon, 24 Jan 2022 15:35:52 +0100
In-Reply-To: <87h7a08kub.fsf@HIDDEN> (Chris Marusich's message of "Tue, 18
 Jan 2022 19:29:00 -0800")
Message-ID: <87lez5td4n.fsf@HIDDEN>
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: /
Authentication-Results: hera.aquilenet.fr;
	none
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-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 53355
Cc: 53355 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Chris,

Chris Marusich <cmmarusich@HIDDEN> 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 <davet@HIDDEN>
-;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Cour=
t=C3=A8s <ludo@HIDDEN>
+;;; Copyright =C2=A9 2015-2022 Ludovic Court=C3=A8s <ludo@HIDDEN>
 ;;; Copyright =C2=A9 2018 Mike Gerwitz <mtg@HIDDEN>
 ;;;
 ;;; 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)

--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#53355; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Jan 2022 03:29:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 18 22:29:13 2022
Received: from localhost ([127.0.0.1]:52060 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nA1er-0002yy-7C
	for submit <at> debbugs.gnu.org; Tue, 18 Jan 2022 22:29:13 -0500
Received: from lists.gnu.org ([209.51.188.17]:39778)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cmmarusich@HIDDEN>) id 1nA1en-0002yp-KU
 for submit <at> debbugs.gnu.org; Tue, 18 Jan 2022 22:29:11 -0500
Received: from eggs.gnu.org ([209.51.188.92]:38398)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <cmmarusich@HIDDEN>)
 id 1nA1en-0002uK-E8
 for bug-guix@HIDDEN; Tue, 18 Jan 2022 22:29:09 -0500
Received: from [2607:f8b0:4864:20::1029] (port=50891
 helo=mail-pj1-x1029.google.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <cmmarusich@HIDDEN>)
 id 1nA1ek-0003eT-R7
 for bug-guix@HIDDEN; Tue, 18 Jan 2022 22:29:09 -0500
Received: by mail-pj1-x1029.google.com with SMTP id pf13so1273115pjb.0
 for <bug-guix@HIDDEN>; Tue, 18 Jan 2022 19:29:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:subject:date:message-id:user-agent:mime-version;
 bh=nnFRz73MbhuLcEhNEVi8POZnviQtuwyS9/E/S2jQVyA=;
 b=Ix8B0Ewh/tzat8tVE2uFgsUZIKmSkGVaFQdJ8HU25dJLvUvbmze5eXqPiBGLrbK+an
 JJUgtmjPcAqGFr0CsnIQ57GuMGYcmyny4VhI4l/mq/HWz38wxPuO6ZZeOE+zdX3QImzO
 VuT3NM9Zf+yrFbybtiVs3x+GwSGMDj5f+TiEHhTtjU6leCkBn7NqjgeKbUVB1VtZ/mge
 CJ/nprqKKbmzkPi8oA5ZVwcWUJE9bFz2AnjUsV2fZhXbbbBwDBv6rJk4rp7TgUu7ADa4
 1mgiNb+tzMI+X2l66fRvroE0QPMDuST5CmL3FnD0FOdRDwDCZqUETZgFRtd4lu5vVd0f
 l+5g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:subject:date:message-id:user-agent
 :mime-version;
 bh=nnFRz73MbhuLcEhNEVi8POZnviQtuwyS9/E/S2jQVyA=;
 b=gIKXjjA7mggT7od5cgUzkvxaUITyhTcRXlN7UK3VwxVul5rftKkv7XSO24veTrYhpY
 vaySOpQdBbFZNvPjUXnqjTOIhVavbQpoTKJ2MxIcQ6gmbN77sdNlSOKAAWwDPMdTlYg4
 wQ1OpreZ6bwArhOcIRlJqgzkRcPcGcxpV+2oeMxDmNxAAyqZEPYhJxYRsbdcNyd7hLIK
 3OyAtOM8RAQg72VaDeWo40sRQtzeG9r47zkXafK7uqYfIQfgwElw4ZpvJiBPtOlpI0VC
 VBnmk235MYGNP/UVsoLkB8bVsE2pjkAkfFxsFRCSVtVk9o36td/vWIGzs9j4EMlFvPf3
 UseQ==
X-Gm-Message-State: AOAM530AUrLC5qqnABDOcMMEx7ZBMhoZjBLR4ZVYOc7FBCMnD6XJ+2DW
 wVg22pVSufF72y8xUFRYhgD20iqLxQU=
X-Google-Smtp-Source: ABdhPJz7yU6YxJFokwFThc44lBmTbkWSkJbYdN1UiQWCLUeYEHSq99JT+1mx7UD7lxzw/w0RV8hs4g==
X-Received: by 2002:a17:903:32c2:b0:14a:37ba:2fa3 with SMTP id
 i2-20020a17090332c200b0014a37ba2fa3mr30789757plr.37.1642562944228; 
 Tue, 18 Jan 2022 19:29:04 -0800 (PST)
Received: from garuda-lan (c-71-231-157-28.hsd1.wa.comcast.net.
 [71.231.157.28])
 by smtp.gmail.com with ESMTPSA id h5sm18662560pfi.46.2022.01.18.19.29.02
 for <bug-guix@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 18 Jan 2022 19:29:03 -0800 (PST)
From: Chris Marusich <cmmarusich@HIDDEN>
To: bug-guix@HIDDEN
Subject: guix shell --check: confusing error message
Date: Tue, 18 Jan 2022 19:29:00 -0800
Message-ID: <87h7a08kub.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1029
 (failed)
Received-SPF: pass client-ip=2607:f8b0:4864:20::1029;
 envelope-from=cmmarusich@HIDDEN; helo=mail-pj1-x1029.google.com
X-Spam_score_int: -12
X-Spam_score: -1.3
X-Spam_bar: -
X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi, I've grown so used to using "guix environment,
 " I thought
 I'd try out "guix shell." It looks pretty neat! It's good to try to improve
 the CLI. However, when I tried "guix shell, " I quickly observed this confusing
 behavior: 
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (cmmarusich[at]gmail.com)
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
 medium trust [209.51.188.17 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [209.51.188.17 listed in wl.mailspike.net]
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 1.3 SPOOFED_FREEMAIL       No description available.
 1.5 SPOOF_GMAIL_MID        From Gmail but it doesn't seem to be...
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi,

I've grown so used to using "guix environment," I thought I'd try out
"guix shell."  It looks pretty neat!  It's good to try to improve the
CLI.

However, when I tried "guix shell," I quickly observed this confusing
behavior:

=2D-8<---------------cut here---------------start------------->8---
[130] marusich@suzaku:~/guix-master
$ guix shell --container --check -D guix
guix shell: checking the environment variables visible from shell '/bin/bas=
h'...
guix shell: warning: variable 'PKG_CONFIG_PATH' is missing from shell envir=
onment
hint: One or more environment variables have a different value in the shell=
 than
the one we set.  This means that you may find yourself running code in an
environment different from the one you asked Guix to prepare.

This usually indicates that your shell startup files are unexpectedly
modifying those environment variables.  For example, if you are using Bash,
make sure that environment variables are set or modified in
`~/.bash_profile' and _not_ in `~/.bashrc'.  For more information on Bash
startup files, run:

     info "(bash) Bash Startup Files"

Alternatively, you can avoid the problem by passing the `--container' or
`-C' option.  That will give you a fully isolated environment running in a
"container", immune to the issue described above.

[1] marusich@suzaku:~/guix-master
$ env | grep PKG_CONF
[1] marusich@suzaku:~/guix-master
$ guix shell --check -D guix
guix shell: checking the environment variables visible from shell '/bin/bas=
h'...
guix shell: warning: variable 'PKG_CONFIG_PATH' is missing from shell envir=
onment
hint: One or more environment variables have a different value in the shell=
 than
the one we set.  This means that you may find yourself running code in an
environment different from the one you asked Guix to prepare.

This usually indicates that your shell startup files are unexpectedly
modifying those environment variables.  For example, if you are using Bash,
make sure that environment variables are set or modified in
`~/.bash_profile' and _not_ in `~/.bashrc'.  For more information on Bash
startup files, run:

     info "(bash) Bash Startup Files"

Alternatively, you can avoid the problem by passing the `--container' or
`-C' option.  That will give you a fully isolated environment running in a
"container", immune to the issue described above.

[1] marusich@suzaku:~/guix-master
$ guix shell -D guix
[0] [env] marusich@suzaku:~/guix-master
$ env | grep PKG
PKG_CONFIG_PATH=3D/gnu/store/qr79b2m6cfdj8ar7g0psqg4hglm6djfm-profile/lib/p=
kgconfig
[0] [env] marusich@suzaku:~/guix-master
$
exit
[0] marusich@suzaku:~/guix-master
$ guix shell --container -D guix
marusich@suzaku ~/guix-master [env]$ env | grep PKG
PKG_CONFIG_PATH=3D/gnu/store/qr79b2m6cfdj8ar7g0psqg4hglm6djfm-profile/lib/p=
kgconfig
marusich@suzaku ~/guix-master [env]$
=2D-8<---------------cut here---------------end--------------->8---

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 really going on here?  It's good to be able to look at this
feature with the eyes of a newbie, since I'm very used to using "guix
environment", but "guix shell" is totally new to me.  I thought it would
be a good opportunity to provide feedback.

=2D-=20
Chris

PGP: https://savannah.gnu.org/people/viewgpg.php?user_id=3D106836

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmHnhXwVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadWR8QANlUC+4jvnGuBlBna2hZl3Qzups+
YBT9EryqYYJxPMY/9IY/cq62nwgtr15WGy03jZjox2cRfimgMBN4u24eY9Mx51hn
Ew7IQR/Cq951q6QOP077Av1hZ7Ey3kJPtln6aUYbLfzo8AT/8/iUpjJZ19vxPiye
gsP4/6AtoCqMFKfw6KQubHzaJAhOJ7I08Ztyr5DYx5IEjhnT/T2D/hk4gMggNs2y
gaWzw/9FXISYl88rsbB3e0WsWBmtvbXkY5wZLJqytcyfmVhINHcAAWof+OhsA0CK
Ngb8uNXtwn4eB1/O6wSCCKk8pDOlZwZ/PzmmlIKHMwRlTu1EVe+r0eF2+dvyjWRM
L7d5hlFYkCBl/y45IYhEE+W3GuDvZzSYenYVoa5KiRPe/dbFvBlwkA7p/5jCZBNJ
yok5EF3t6/EQhicuTYEGfqJUdQHPwXeQpuIYP59dOsuxwa6KkuzTP6kmMM8rJtjL
FjgB9tq4dAX+x49Oo37mwvG0jjMoJdIVRZBBmhloenPPJLqbdK5T1YEnN3PCwfXW
gqT181jznOFXcFCz1/6KzPlDdyb7dXOi9ZyaOrGJSGt17PKKc04YHBLb+d/2sPKC
pvohNZM+VJlwLkn0JSuX2Pv+YbuSI+U+T31/F0wdSgYlj0R8Z1vYqj1S1wSrep0y
2esEmSKqCxXR2V/s
=E1CA
-----END PGP SIGNATURE-----
--=-=-=--




Acknowledgement sent to Chris Marusich <cmmarusich@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#53355; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 20 May 2022 21:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.