GNU logs - #51466, boring messages


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: guix shell --check reports missing PKG_CONFIG_PATH on Debian bookworm
Resent-From: Vagrant Cascadian <vagrant@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Thu, 28 Oct 2021 19:10:02 +0000
Resent-Message-ID: <handler.51466.B.16354481785497 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 51466 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-guix@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.16354481785497
          (code B ref -1); Thu, 28 Oct 2021 19:10:02 +0000
Received: (at submit) by debbugs.gnu.org; 28 Oct 2021 19:09:38 +0000
Received: from localhost ([127.0.0.1]:53223 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mgAmK-0001QV-MT
	for submit <at> debbugs.gnu.org; Thu, 28 Oct 2021 15:09:38 -0400
Received: from lists.gnu.org ([209.51.188.17]:53102)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vagrant@HIDDEN>) id 1mgAmF-0001QH-3t
 for submit <at> debbugs.gnu.org; Thu, 28 Oct 2021 15:09:30 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37758)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <vagrant@HIDDEN>)
 id 1mgAm9-00059O-2o
 for bug-guix@HIDDEN; Thu, 28 Oct 2021 15:09:26 -0400
Received: from cascadia.aikidev.net ([173.255.214.101]:54840)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <vagrant@HIDDEN>) id 1mgAm6-00019x-Jp
 for bug-guix@HIDDEN; Thu, 28 Oct 2021 15:09:20 -0400
Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e])
 (Authenticated sender: vagrant@HIDDEN)
 by cascadia.aikidev.net (Postfix) with ESMTPSA id 939091AA2C
 for <bug-guix@HIDDEN>; Thu, 28 Oct 2021 12:09:11 -0700 (PDT)
From: Vagrant Cascadian <vagrant@HIDDEN>
Date: Thu, 28 Oct 2021 12:08:59 -0700
Message-ID: <87r1c5c6gk.fsf@ponder>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
Received-SPF: none client-ip=173.255.214.101; envelope-from=vagrant@HIDDEN;
 helo=cascadia.aikidev.net
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001,
 SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
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

This is a recently installed Debian bookworm system, initially using the
package from debian experimental (guix 1.3.0-3, built with guile 3.0),
and "guix pull" up to a recent guix master:

vagrant@vagranttdgxbookworm:~$ guix describe
Generation 7    Oct 28 2021 11:04:25    (current)
  guix 0e6470b
    repository URL: /home/vagrant/src/guix
    branch: master
    commit: 0e6470b47f00470c213fbf20bddc5bcf1e2f8e2a


Most things seem to work fine, but noticed an oddity with guix shell:

vagrant@vagranttdgxbookworm:~$ guix shell --pure --check --development guix guix git less

guix shell: checking the environment variables visible from shell
'/bin/bash'...
guix shell: warning: variable 'PKG_CONFIG_PATH' is missing from shell
environment
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.

vagrant@vagranttdgxbookworm:~$ guix shell --pure --development guix guix git less

vagrant@vagranttdgxbookworm:~$ echo $PKG_CONFIG_PATH
/gnu/store/9vk59alg27y0cp1za91nfdjiy718cn1f-profile/lib/pkgconfig


So, --check seems to think the environment variable is missing but
running without --check the variable is defined...

I don't see anything obviously relevent in /etc/profile/ or
/etc/profile.d/guix.sh or /etc/profile.d/bash-completions.sh or
~/.profile or ~/.bashrc ... just used the defaults that shipped in
Debian.


live well,
  vagrant

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

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

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYXr1UgAKCRDcUY/If5cW
quNBAP9rKrI7XSjsfxSFRJhJDY62J8PGtJRe7KJrqg7SaxDSQQEA6jpZL4/0xHFu
lrPBTdWmpRSK0MM/wY/oH34Z8On0JA4=
=/3/d
-----END PGP SIGNATURE-----
--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Vagrant Cascadian <vagrant@HIDDEN>
Subject: bug#51466: Acknowledgement (guix shell --check reports missing
 PKG_CONFIG_PATH on Debian bookworm)
Message-ID: <handler.51466.B.16354481785497.ack <at> debbugs.gnu.org>
References: <87r1c5c6gk.fsf@ponder>
X-Gnu-PR-Message: ack 51466
X-Gnu-PR-Package: guix
Reply-To: 51466 <at> debbugs.gnu.org
Date: Thu, 28 Oct 2021 19:10:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-guix@HIDDEN

If you wish to submit further information on this problem, please
send it to 51466 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
51466: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D51466
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: guix shell --check reports missing PKG_CONFIG_PATH on Debian bookworm
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Fri, 29 Oct 2021 19:07:01 +0000
Resent-Message-ID: <handler.51466.B51466.163553439830832 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: Vagrant Cascadian <vagrant@HIDDEN>
Cc: 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.163553439830832
          (code B ref 51466); Fri, 29 Oct 2021 19:07:01 +0000
Received: (at 51466) by debbugs.gnu.org; 29 Oct 2021 19:06:38 +0000
Received: from localhost ([127.0.0.1]:55927 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mgXD3-00081D-O1
	for submit <at> debbugs.gnu.org; Fri, 29 Oct 2021 15:06:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54012)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mgXD1-00080t-M1
 for 51466 <at> debbugs.gnu.org; Fri, 29 Oct 2021 15:06:36 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50396)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1mgXCw-0004SF-4D; Fri, 29 Oct 2021 15:06:30 -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=jx3LZTwkn3BdCehjDELtvlqzISY/VHpu03vUcYVB7c8=; b=bbMX5Fo9Whq6RVQE//d8
 Xmd5lra4kygT1JZKaiTBhCS17ju78zLcYaz2RZrCFLXuAPaYuXLvPTVbL9Cu6q/JIaIBaH6XyMG4h
 cRYUjgiI/2AgK/8S5ErhKThMvChqnnOJ6/WmL3CYHbXIHTGrmmVjJoVSzY5j3nAOlGbzKL9+WIimJ
 97kAVZozZslbAm6AgKSEmks4fIR5qykajTJDF2dZLedRq61r+vGbsC5tM0KZmk7X0+HGrhPSiuZ3s
 /mfg/kNoFqn+8I9PigrLXD0x+GxPnaZT9bsW/S1Rbz9gsZNVEx/oEoaQ6CW6KLKaIqLdGIpmnYnFY
 GCVK/XHHnCMbcg==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:54874
 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 1mgXCv-0000dd-Mq; Fri, 29 Oct 2021 15:06:29 -0400
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
References: <87r1c5c6gk.fsf@ponder>
Date: Fri, 29 Oct 2021 21:06:26 +0200
In-Reply-To: <87r1c5c6gk.fsf@ponder> (Vagrant Cascadian's message of "Thu, 28
 Oct 2021 12:08:59 -0700")
Message-ID: <87o877y7kd.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-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!

Vagrant Cascadian <vagrant@HIDDEN> skribis:

> Most things seem to work fine, but noticed an oddity with guix shell:
>
> vagrant@vagranttdgxbookworm:~$ guix shell --pure --check --development gu=
ix guix git less
>
> guix shell: checking the environment variables visible from shell
> '/bin/bash'...
> guix shell: warning: variable 'PKG_CONFIG_PATH' is missing from shell

[...]

> vagrant@vagranttdgxbookworm:~$ guix shell --pure --development guix guix =
git less
>
> vagrant@vagranttdgxbookworm:~$ echo $PKG_CONFIG_PATH
> /gnu/store/9vk59alg27y0cp1za91nfdjiy718cn1f-profile/lib/pkgconfig

Notice that it doesn=E2=80=99t complain about any of the other environment
variables (there are 10 of them according to =E2=80=98guix shell -D guix
--search-paths|wc -l=E2=80=99).

If you look at =E2=80=98child-shell-environment=E2=80=99 in (guix scripts e=
nvironment),
it runs this in the child shell:

  env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit

If the shell prints non-newline-terminated stuff before the output of
=E2=80=98env=E2=80=99, the first line of =E2=80=98env=E2=80=99 would be swa=
llowed by the parser below.

Could you run:

  strace -o log -s 500 guix shell --check -D guix

to see exactly what =E2=80=98guix shell=E2=80=99 reads?

If there=E2=80=99s nothing obvious, you know the story: we can always add =
=E2=80=98pk=E2=80=99
calls in =E2=80=98child-shell-environment=E2=80=99.  :-)

Thanks,
Ludo=E2=80=99.




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: guix shell --check reports missing PKG_CONFIG_PATH on Debian bookworm
Resent-From: Vagrant Cascadian <vagrant@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sat, 30 Oct 2021 06:37:01 +0000
Resent-Message-ID: <handler.51466.B51466.163557576616808 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.163557576616808
          (code B ref 51466); Sat, 30 Oct 2021 06:37:01 +0000
Received: (at 51466) by debbugs.gnu.org; 30 Oct 2021 06:36:06 +0000
Received: from localhost ([127.0.0.1]:56570 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mghyH-0004N1-MG
	for submit <at> debbugs.gnu.org; Sat, 30 Oct 2021 02:36:05 -0400
Received: from cascadia.aikidev.net ([173.255.214.101]:42152)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vagrant@HIDDEN>) id 1mghyC-0004MR-Vo
 for 51466 <at> debbugs.gnu.org; Sat, 30 Oct 2021 02:36:04 -0400
Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b])
 (Authenticated sender: vagrant@HIDDEN)
 by cascadia.aikidev.net (Postfix) with ESMTPSA id 0F3CD1AA2C;
 Fri, 29 Oct 2021 23:35:55 -0700 (PDT)
From: Vagrant Cascadian <vagrant@HIDDEN>
In-Reply-To: <87o877y7kd.fsf@HIDDEN>
References: <87r1c5c6gk.fsf@ponder> <87o877y7kd.fsf@HIDDEN>
Date: Fri, 29 Oct 2021 23:35:50 -0700
Message-ID: <87k0hvggu1.fsf@yucca>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: 0.0 (/)
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

On 2021-10-29, Ludovic Court=C3=A8s wrote:
> Vagrant Cascadian <vagrant@HIDDEN> skribis:
>
>> Most things seem to work fine, but noticed an oddity with guix shell:
>>
>> vagrant@vagranttdgxbookworm:~$ guix shell --pure --check --development g=
uix guix git less
>>
>> guix shell: checking the environment variables visible from shell
>> '/bin/bash'...
>> guix shell: warning: variable 'PKG_CONFIG_PATH' is missing from shell
>
> [...]
>
>> vagrant@vagranttdgxbookworm:~$ guix shell --pure --development guix guix=
 git less
>>
>> vagrant@vagranttdgxbookworm:~$ echo $PKG_CONFIG_PATH
>> /gnu/store/9vk59alg27y0cp1za91nfdjiy718cn1f-profile/lib/pkgconfig
>
> Notice that it doesn=E2=80=99t complain about any of the other environment
> variables (there are 10 of them according to =E2=80=98guix shell -D guix
> --search-paths|wc -l=E2=80=99).
>
> If you look at =E2=80=98child-shell-environment=E2=80=99 in (guix scripts=
 environment),
> it runs this in the child shell:
>
>   env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit
>
> If the shell prints non-newline-terminated stuff before the output of
> =E2=80=98env=E2=80=99, the first line of =E2=80=98env=E2=80=99 would be s=
wallowed by the parser below.
>
> Could you run:
>
>   strace -o log -s 500 guix shell --check -D guix
>
> to see exactly what =E2=80=98guix shell=E2=80=99 reads?

That showed nothing obvious to me; the log it spits out is about 3MB
(~320k compressed with zstd) I could attach if it is useful...

I did notice SHELL=3D/bin/bash, and tried an experiment:

  $ SHELL=3D/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16/bin/bas=
h guix shell --check -D guix
  guix shell: checking the environment variables visible from shell
  '/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16/bin/bash'...
  guix shell: All is good!  The shell gets correct environment variables.

So, somehow the value of SHELL and/or the user's default shell is
triggering the issue?


live well,
  vagrant

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

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

iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYXznxgAKCRDcUY/If5cW
qpfbAP9089bV8OFTOUgGd2qJo+nVRx8mnMlTow4V+p63ONpotwD+Itq3TH9KiVRb
TQ90cqEOIb8M/QVRpyN0I2imW1+yXQ0=
=Dy+s
-----END PGP SIGNATURE-----
--=-=-=--




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: guix shell --check reports missing PKG_CONFIG_PATH on Debian bookworm
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sat, 30 Oct 2021 14:22:02 +0000
Resent-Message-ID: <handler.51466.B51466.163560369811852 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: Vagrant Cascadian <vagrant@HIDDEN>
Cc: 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.163560369811852
          (code B ref 51466); Sat, 30 Oct 2021 14:22:02 +0000
Received: (at 51466) by debbugs.gnu.org; 30 Oct 2021 14:21:38 +0000
Received: from localhost ([127.0.0.1]:58099 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mgpEk-000351-Uk
	for submit <at> debbugs.gnu.org; Sat, 30 Oct 2021 10:21:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34006)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mgpEj-00034m-Cn
 for 51466 <at> debbugs.gnu.org; Sat, 30 Oct 2021 10:21:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54362)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1mgpEd-0005pv-JZ; Sat, 30 Oct 2021 10:21:27 -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=x1sDf2DFW+7J17UtvkUvRlkDCPGBCHtts97TmSqm9lA=; b=gSlMEwIDuzWGyxpOwlZo
 7W5uLA6NvsKCGXgZ/2VqCRAOvRCKnXtK+J3WsarxPyn3rJgTWub3TaF5dDx/3YuD7Yi/HZUNQH24c
 TBKaUO1it764Dw+s9FI199YcgQ7Gl1ZDIfqXBxij7MiQrklkp3F5R3mJd9vxZk5C7CYoooujH86jB
 xd8molsSstOaaMMaPjI6Lodpk4HEBzEF6d1MN9vsRqskueSeaSueAejV4QQWsUOqCjOhhgWIJOj/e
 Ej0ZVRRoSy9LD/PbES4IFYT7IY+eBPZipzW5FeYB57WWq6pDkaIb+14tEDmn8buPr/DhiRKZXyxU2
 MDcnPAAychH7Sw==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:55484
 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 1mgpEd-0008Op-6h; Sat, 30 Oct 2021 10:21:27 -0400
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
References: <87r1c5c6gk.fsf@ponder> <87o877y7kd.fsf@HIDDEN>
 <87k0hvggu1.fsf@yucca>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 9 Brumaire an 230 de la =?UTF-8?Q?R=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: Sat, 30 Oct 2021 16:21:25 +0200
In-Reply-To: <87k0hvggu1.fsf@yucca> (Vagrant Cascadian's message of "Fri, 29
 Oct 2021 23:35:50 -0700")
Message-ID: <87lf2atwyi.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-Spam-Score: -2.3 (--)
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 (---)

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

Howdy!

Vagrant Cascadian <vagrant@HIDDEN> skribis:

> On 2021-10-29, Ludovic Court=C3=A8s wrote:

[...]

>> If you look at =E2=80=98child-shell-environment=E2=80=99 in (guix script=
s environment),
>> it runs this in the child shell:
>>
>>   env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit
>>
>> If the shell prints non-newline-terminated stuff before the output of
>> =E2=80=98env=E2=80=99, the first line of =E2=80=98env=E2=80=99 would be =
swallowed by the parser below.
>>
>> Could you run:
>>
>>   strace -o log -s 500 guix shell --check -D guix
>>
>> to see exactly what =E2=80=98guix shell=E2=80=99 reads?
>
> That showed nothing obvious to me; the log it spits out is about 3MB
> (~320k compressed with zstd) I could attach if it is useful...
>
> I did notice SHELL=3D/bin/bash, and tried an experiment:
>
>   $ SHELL=3D/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16/bin/b=
ash guix shell --check -D guix
>   guix shell: checking the environment variables visible from shell
>   '/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16/bin/bash'...
>   guix shell: All is good!  The shell gets correct environment variables.
>
> So, somehow the value of SHELL and/or the user's default shell is
> triggering the issue?

Yes, =E2=80=98--check=E2=80=99 runs $SHELL.

To make sure, could you try with the attached patch to see exactly which
variables =E2=80=98guix shell=E2=80=99 =E2=80=9Csees=E2=80=9D, and whether =
it drops a line it shouldn=E2=80=99t
drop?

TIA,
Ludo=E2=80=99.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index cca0ad991b..7f3d3b9db8 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -452,10 +452,10 @@ (define lines
           ;; but it also truncates values anyway, so don't try to support it.
           (let ((index (string-index line #\=)))
             (if index
-                (vhash-cons (string-take line index)
+                (vhash-cons (pk 'variable line (string-take line index))
                             (string-drop line (+ 1 index))
                             table)
-                table)))
+                (pk 'dropped line table))))
         vlist-null
         lines))
 

--=-=-=--




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


Received: (at control) by debbugs.gnu.org; 15 Nov 2021 14:43:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 15 09:43:30 2021
Received: from localhost ([127.0.0.1]:53156 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mmdCk-0001pk-Og
	for submit <at> debbugs.gnu.org; Mon, 15 Nov 2021 09:43:30 -0500
Received: from eggs.gnu.org ([209.51.188.92]:51262)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mmdCk-0001pW-7F
 for control <at> debbugs.gnu.org; Mon, 15 Nov 2021 09:43:30 -0500
Received: from [2001:470:142:3::e] (port=37088 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 1mmdCe-00067j-Vn
 for control <at> debbugs.gnu.org; Mon, 15 Nov 2021 09:43:24 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to:
 references; bh=tfgE/GC2Y0bAidiqOgt7QVc6l7L70d+/ds1PUV/2ndk=; b=eVkr8iDjS6rqMw
 mf/K4+IZSxNSW5szzP/RX2q0bnsZTThDkS0q4GYBEFW4bgiPfFQeFEUVVgQ0+v6TGPk/XR/C7DcUI
 zEchXjg4GRjNbV9W8LvetRleKuxykkyUA02uFmQf4aA0DDHiZl5rp7kvcyzRmfd3ZFYWkXCNGSq7a
 NxV4H8tIGYpDfMQZr0al4ZrBY8D5juA6WxDMhe198+EjKNLBKcdJBdjLGxzlPxqZWtdspvZ+iR/hT
 3QJezXw7V/FZln3EaQmrwOSFb7+pDBg2l2bqyxU/u7m6K3nT7oZJQ5mCjziGw9h1mHy/ZfnD98nPZ
 WiloVa1ef5IoDFO9CP1Q==;
Received: from [193.50.110.110] (port=57562 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 1mmdCe-0002O2-Go
 for control <at> debbugs.gnu.org; Mon, 15 Nov 2021 09:43:24 -0500
Date: Mon, 15 Nov 2021 15:43:22 +0100
Message-Id: <8735nx5vjp.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Subject: control message for bug #51466
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
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 (---)

tags 51466 + moreinfo
quit





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


Received: (at control) by debbugs.gnu.org; 2 Feb 2022 07:11:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 02 02:11:14 2022
Received: from localhost ([127.0.0.1]:51281 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nF9nO-0006kz-9G
	for submit <at> debbugs.gnu.org; Wed, 02 Feb 2022 02:11:14 -0500
Received: from mail-pl1-f179.google.com ([209.85.214.179]:40850)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cmmarusich@HIDDEN>) id 1nF9nJ-0006kd-PW
 for control <at> debbugs.gnu.org; Wed, 02 Feb 2022 02:11:13 -0500
Received: by mail-pl1-f179.google.com with SMTP id y17so17422598plg.7
 for <control <at> debbugs.gnu.org>; Tue, 01 Feb 2022 23:11:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=date:message-id:to:from:subject;
 bh=2y4DkSmvZ56gXs/lkRC63mmagTYSy8m8JPYZK/uxOXo=;
 b=RqpZRSaFPAJwb4qG5K/2WU2rn87WDZLCkauuuNurhyObW0dZCqYWq/CCRrbZID51la
 iADq/OQ06KYZmMv1IbFqOtsTv9zE9JYMaQe0PjDZe7Sv9lfQ2+KtYsgV4WpKuiFnLzBo
 SVOi5qTNur5NFDQClks6RxW0Ut8hq3lrf2SDtKQSaoO31wUJFks/6QYuN03Jqzp+wn8E
 riX+uZz/c8xnG8PlZCGJdpdwrO5m1cLVNfMllWzBi++2daxXFoSdww/QyiArroeaQt/q
 JWmyu7Ts0jBLvllGOeW0A4p/8qxF7bOoOz7phx3xLJpK6tQin1SNLPesmldLxsnROGc7
 TtGg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:date:message-id:to:from:subject;
 bh=2y4DkSmvZ56gXs/lkRC63mmagTYSy8m8JPYZK/uxOXo=;
 b=3rM6uWK4YzFkRSFkfQJqOcH9quWbv91d0ukZzKxC+FCwmndYDbfGxdZZiPcSKf0ByT
 l9/6imQonWK7KmtCuRG3rOfuUqNzqd9T6/dvFnm4TAphhAXh8szrqXdF2xpeyGZxXrbO
 dAne8M3AMcyXFsY5o/3M+stMA1b2Dmk01opPQjkNItWHPq8WlvpmyALpHqbm30infV8B
 Ap3tGXjkvvo5DPG5w6JiG+S73yCQ6g8Lca0mgUDtX/xwxDFTT1+736TlEpKkkUrGVSfU
 lfnrkIBvfbYqAIHhWuTmh0D8+jlAAgU2O21R53Q9ZujtJUpJkJoXtwhlBWyH16FFzBMh
 FA4g==
X-Gm-Message-State: AOAM533v7nCw4nYV0ztPRh9nZiSoXkIh70Nt8UrfvLXlQ9RiNyoMG7Wi
 wDcrggX3W9Z7t0jNP+YSYgAwB+Y5niA=
X-Google-Smtp-Source: ABdhPJwdnpqAkWzZvhAjxNS1LQj5LwplQcyYBVanBzPoRk+WavBaGLL774qwcp8HiVA+711iyZ0fMA==
X-Received: by 2002:a17:902:710c:: with SMTP id
 a12mr29197752pll.108.1643785863471; 
 Tue, 01 Feb 2022 23:11:03 -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 u18sm25420048pfi.185.2022.02.01.23.11.02
 for <control <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 01 Feb 2022 23:11:02 -0800 (PST)
Date: Tue, 01 Feb 2022 23:11:01 -0800
Message-Id: <87wnid3fqy.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Chris Marusich <cmmarusich@HIDDEN>
Subject: control message for bug #53355
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: control
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 (-)

merge 53355 51466
quit





Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Chris Marusich <cmmarusich@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Wed, 02 Feb 2022 07:50:01 +0000
Resent-Message-ID: <handler.51466.B51466.16437881806938 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.16437881806938
          (code B ref 51466); Wed, 02 Feb 2022 07:50:01 +0000
Received: (at 51466) by debbugs.gnu.org; 2 Feb 2022 07:49:40 +0000
Received: from localhost ([127.0.0.1]:51321 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nFAOa-0001nq-GY
	for submit <at> debbugs.gnu.org; Wed, 02 Feb 2022 02:49:40 -0500
Received: from mail-pj1-f54.google.com ([209.85.216.54]:40572)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cmmarusich@HIDDEN>) id 1nFAOZ-0001nZ-0Q
 for 51466 <at> debbugs.gnu.org; Wed, 02 Feb 2022 02:49:39 -0500
Received: by mail-pj1-f54.google.com with SMTP id
 z10-20020a17090acb0a00b001b520826011so5999922pjt.5
 for <51466 <at> debbugs.gnu.org>; Tue, 01 Feb 2022 23:49:38 -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=Ag48wvr7nOjPGfUSXOJcHP5/2pRlSxCVXL7fbpOSRTE=;
 b=Dm0CiJMufRTzjvyC1t70M+uRq8aF4yM0vwJ86yDhHUnSSy7qy2gtx7F14xY+M4xTMm
 utvO1aals2l35J+KBBCa0euAkgAYBxHRI+hjOFTdiq0f5EKTgAF077+/0NBEmgwiSo/W
 +abQiedoaxSb2gOGO3qMA8VGvrwiUiYRyknPnJykQQD4cuEGqqUwciqj+CLrvLUXs+8t
 iGPTvSEer8rRL3DXbaSsOGDIYeUaERLq0hZcj6MnVuVMXX4MNCj3O2ckiw+Hu4EoXEoJ
 pMHGXGOMf29fTZERKLJwQEfSdxwT+axbpXvmUmBT+uBqzjdm718VzrtGrq96rnFlKMzS
 ZilQ==
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=Ag48wvr7nOjPGfUSXOJcHP5/2pRlSxCVXL7fbpOSRTE=;
 b=PLgRI9BsIXJwgvg8o4+gGPqxPajEBrAQTV28o/DHnFBFv44jDTFu+Q5Fg9E+8O6nAD
 fo9L6AUpkzyEDFeRJRTd6o+pjm52eF+GBzR2KcK9ED71Uha64jUc74kCNsr/X4nos5ez
 1s+jPR4+dVLI6VQfz/5rj+wpUG6w8jk5rz10Sg6MJAAECwtYlz/k/ZS/RFlSBTArzCzO
 GuRBnlO1BoeOWyKEs3rV4vjijc2S+SN+mxIWqvhvrbXmiv+dhSUG1pcL6Hd2R/fiDcrH
 JSY8zudmJ1B/k3T0GHaIGy7GEtrzAEl6nMy1IwbNncTrvDaat4wNY/zS7frvQkG9TyHD
 nYmg==
X-Gm-Message-State: AOAM530XFjBIjOuRu+Zdq+UcYgh1YZMoS3PXBEd3DzmkZ3AYhDqWQctS
 UOqQRnPam40ImNurbRsE/2BeGDZRWJQ=
X-Google-Smtp-Source: ABdhPJw2uTyV3v3cqZB/LYg+xVxx48RotO2drm+T7aw9kG0D0fZ9s42YghV7DV5H3sBQsWrshlWXmw==
X-Received: by 2002:a17:903:2291:: with SMTP id
 b17mr28929495plh.83.1643788172238; 
 Tue, 01 Feb 2022 23:49:32 -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 6sm12703428pgx.36.2022.02.01.23.49.31
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 01 Feb 2022 23:49:31 -0800 (PST)
From: Chris Marusich <cmmarusich@HIDDEN>
References: <87h7a08kub.fsf@HIDDEN> <87lez5td4n.fsf@HIDDEN>
 <87sftc4osu.fsf@HIDDEN> <87h79slysd.fsf@HIDDEN>
Date: Tue, 01 Feb 2022 23:49:28 -0800
In-Reply-To: <87h79slysd.fsf@HIDDEN> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 25 Jan 2022 14:39:46 +0100")
Message-ID: <87sft13dyv.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-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,

I also observed this bug and reported it as 53355.  I tried to search
for bugs, but I didn't find this bug report until Ludo mentioned it.  I
think it's probably the same bug, so I've merged them.

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

> 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?).

Yes, it's also Debian.  Debian Bullseye.  I've also verified that
similar behavior occurs on Fedora, although the problematic env vars are
different.  I tried fiddling with SHELL like Vagrant did, but I couldn't
make the error go away like he did.  Maybe I did something differently.

> Could you try the debugging tricks I proposed there?

Sure thing!  Thank you for taking the time to make the patch, even
though it was simple.  Here is the result on my Debian Bullseye ppc64el
system:

=2D-8<---------------cut here---------------start------------->8---
[0] [env] marusich@suzaku:~/guix-master
$ ./pre-inst-env guix shell --check --pure --development guix
guix shell: checking the environment variables visible from shell '/bin/sh'=
...

;;; (dropped "env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exi=
t" #<vlist ()>)

;;; (variable "$ LIBRARY_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h=
-profile/lib" "$ LIBRARY_PATH")

;;; (variable "C_INCLUDE_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h=
-profile/include" "C_INCLUDE_PATH")

;;; (variable "USER=3Dmarusich" "USER")

;;; (variable "GUIX_LOCPATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-p=
rofile/lib/locale" "GUIX_LOCPATH")

;;; (variable "HOME=3D/home/marusich" "HOME")

;;; (variable "GUILE_LOAD_COMPILED_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1=
rj02mivg4h-profile/lib/guile/3.0/site-ccache:/gnu/store/hvcq6yjfjjc7060pq09=
zm1rj02mivg4h-profile/share/guile/site/3.0" "GUILE_LOAD_COMPILED_PATH")

;;; (variable "CPLUS_INCLUDE_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mi=
vg4h-profile/include/c++:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profil=
e/include" "CPLUS_INCLUDE_PATH")

;;; (variable "INFOPATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi=
le/share/info" "INFOPATH")

;;; (variable "LOGNAME=3Dmarusich" "LOGNAME")

;;; (variable "PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4=
h-profile/lib/pkgconfig" "PKG_CONFIG_PATH")

;;; (variable "TERM=3Dscreen.xterm-256color" "TERM")

;;; (variable "ACLOCAL_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-p=
rofile/share/aclocal" "ACLOCAL_PATH")

;;; (variable "PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/b=
in:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/sbin" "PATH")

;;; (variable "GUIX_ENVIRONMENT=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg=
4h-profile" "GUIX_ENVIRONMENT")

;;; (variable "GUILE_LOAD_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4=
h-profile/share/guile/site/3.0" "GUILE_LOAD_PATH")

;;; (variable "PWD=3D/home/marusich/guix-master" "PWD")
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] [env] marusich@suzaku:~/guix-master
$
=2D-8<---------------cut here---------------end--------------->8---

The presence of the "$" in front of LIBRARY_PATH seems suspicious:

  ;;; (variable "$ LIBRARY_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg=
4h-profile/lib" "$ LIBRARY_PATH")

I'm not sure why the "$" is being added.  I tried various things to
remove it.  I tried explicitly setting PS1 to an empty string in my
~/.bashrc.  I also tried setting it explicitly to an empty string in
/etc/profile.  Maybe if we can figure out where that "$ " prefix is
coming from, we can resolve this issue?

=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+x3UCaFdgiRp0FAmH6N4gVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkad+1MP/0akKpMnXNnwb16MGdmTTaP6yw5e
3BilTwLForpvYm3c9Ed1k9xOLO/v0l9Ll6i5GVD6PI8lxFeJ8Qy6isaTo3PH0tJC
jDVf+kl5PUOCIzTlewnW6aaUbDnYUY8Wo+rKGwl87yp4bOmFjXbdbEJk7Vx1jTzH
fYl59Yn4jD/pCe8CR7BOqkGOaSqFwGfYIrSlsBfkvwn12khzYk1859Q27Cbzgg0F
L2kRXmDJnrFQG5oqRK9r9LNXbP3Z5XCRiib1/AJXJv+Hbf0sgrK2kntp2fJpZ9DM
9jxU8gWKvN5rYpxzaPnKD4/Y9dr3ERuk1SBssTJMgpozERTrFl1Rh8eNYLt7BUja
78PBa4R/D+8sDwiVhog4IS9jIKV3QGbW/Em56s4NtzAwvSjn8hCP66BEYAKSCPyg
WDXgcUfu3Ut510ZyHHtChmXsG3YFjm8hfWUTdBuSM8AQqIsNh96DRo35iJEICHA+
8aexhzcoO2h1Cc9GS1APbFEWwZhKY7vy+jLeN52tJyZ10QTShcirBNKOBx9LvLFF
rgUbPWW88Bj9BLAeRaVsHrB29gNc0+PW7G5M1l2sQQ5RwlUEmFQb/vGt0CkehECJ
Dd2U9d1hiDcpk0SwPMLxNalsSE9s9oBSF1UTkp1sdwC74nim72WoBKppHc4U1Y7l
0sokQsNzd7jBakDZ
=uHkI
-----END PGP SIGNATURE-----
--=-=-=--




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 08 Feb 2022 09:27:02 +0000
Resent-Message-ID: <handler.51466.B51466.16443123988101 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>
Cc: 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.16443123988101
          (code B ref 51466); Tue, 08 Feb 2022 09:27:02 +0000
Received: (at 51466) by debbugs.gnu.org; 8 Feb 2022 09:26:38 +0000
Received: from localhost ([127.0.0.1]:45299 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nHMla-00026O-HE
	for submit <at> debbugs.gnu.org; Tue, 08 Feb 2022 04:26:38 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:35028)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1nHMlY-00026A-TH
 for 51466 <at> debbugs.gnu.org; Tue, 08 Feb 2022 04:26:29 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 92AAE361;
 Tue,  8 Feb 2022 10:26:22 +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 affheNiImK3S; Tue,  8 Feb 2022 10:26:21 +0100 (CET)
Received: from ribbon (unknown [193.50.110.192])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 9D029132;
 Tue,  8 Feb 2022 10:26:21 +0100 (CET)
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
References: <87h7a08kub.fsf@HIDDEN> <87lez5td4n.fsf@HIDDEN>
 <87sftc4osu.fsf@HIDDEN> <87h79slysd.fsf@HIDDEN>
 <87sft13dyv.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 20 =?UTF-8?Q?Pluvi=C3=B4se?= an 230 de la
 =?UTF-8?Q?R=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, 08 Feb 2022 10:26:21 +0100
In-Reply-To: <87sft13dyv.fsf@HIDDEN> (Chris Marusich's message of "Tue, 01
 Feb 2022 23:49:28 -0800")
Message-ID: <874k59d802.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: 92AAE361
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:+,3:+];
 RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[];
 MID_RHS_MATCH_FROM(0.00)[]
X-Spam-Score: 1.0 (+)
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

Hi Chris,

Thanks for testing!

Chris Marusich <cmmarusich@HIDDEN> skribis:

> The presence of the "$" in front of LIBRARY_PATH seems suspicious:
>
>   ;;; (variable "$ LIBRARY_PATH=/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib" "$ LIBRARY_PATH")
>
> I'm not sure why the "$" is being added.  I tried various things to
> remove it.  I tried explicitly setting PS1 to an empty string in my
> ~/.bashrc.  I also tried setting it explicitly to an empty string in
> /etc/profile.  Maybe if we can figure out where that "$ " prefix is
> coming from, we can resolve this issue?

How about this:


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index ec071402f4..ac2c79ab65 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -420,7 +420,7 @@ (define script
     ;; Script to obtain the list of environment variable values.  On a POSIX
     ;; shell we can rely on 'set', but on fish we have to use 'env' (fish's
     ;; 'set' truncates values and prints them in a different format.)
-    "env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\n")
+    "PS1=; env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\n")
 
   (define lines
     (match (primitive-fork)

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


?

Thanks,
Ludo=E2=80=99.

--=-=-=--




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Chris Marusich <cmmarusich@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sun, 13 Feb 2022 23:18:01 +0000
Resent-Message-ID: <handler.51466.B51466.164479425829016 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.164479425829016
          (code B ref 51466); Sun, 13 Feb 2022 23:18:01 +0000
Received: (at 51466) by debbugs.gnu.org; 13 Feb 2022 23:17:38 +0000
Received: from localhost ([127.0.0.1]:39132 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nJO7c-0007Xv-Tx
	for submit <at> debbugs.gnu.org; Sun, 13 Feb 2022 18:17:38 -0500
Received: from mail-pl1-f177.google.com ([209.85.214.177]:38615)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cmmarusich@HIDDEN>) id 1nJO7Z-0007Xg-Sd
 for 51466 <at> debbugs.gnu.org; Sun, 13 Feb 2022 18:17:35 -0500
Received: by mail-pl1-f177.google.com with SMTP id c3so9201448pls.5
 for <51466 <at> debbugs.gnu.org>; Sun, 13 Feb 2022 15:17:33 -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=iiEVZTE5lTju0+EWi7oRZo+JjgUrJeOHwGfwt7I/41o=;
 b=lRVDHQCC97ra2GqG8tQiJwL+fW+altPKWGJdsyVn7ta8c6TyiFo1I5y/qEaTSMRrP+
 VGmcjlFTpFnOQ5+P43JN6hJxYFHhp5t+K33LtSixRs8DCwBxU9pAh0x4TWP7dvdiVDDt
 tpdv5U8aOJGO8zezHxaYnNvaBTnPPSNohPuRXq3nyu0eOuA/n64QOK6I1P7EOTUqmRDg
 8GTIka3qgiA46RvDZozqUtM1P5pX/uEw8eGE3aSXT2fYtKaTAZaDFdb9v6neppZKiex/
 YVXgk/J91hIYl4oK+O8PSFBuUy2e8P6cxgx4vWtD+UhGawJFwKZhDoKGLQOl4CSYqELT
 lWNQ==
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=iiEVZTE5lTju0+EWi7oRZo+JjgUrJeOHwGfwt7I/41o=;
 b=ettNd3DGc0/5v/TcnhNuvGyW4/4/PnG69/5wdnnE4pyibOdxmCFlAebwlwN3PxMdrO
 WUruhrJOn9GhiLKQHHdW4JKZCfLvSuBPie+m5EG55fJ8TuDJmnhSecRMKmvl5RaMEs6h
 n2MxFeWNPFiANoGJxQNSdoUB8qXPGccthzKt+okwX4jymqjIubowz3ovqVq8HBGfH+8G
 0axk1JRm9tIIdaTmd3frwbY28OKhbW7/M/IK4rf2lcjPrpg75QmyrviHJDraTDrrPkhB
 mfEaQQryG33kgQw+sNby+2QM6IsEPpRL6wG0giECQ+T/6U2JXudQ1CWIwyUee1BScHLw
 eajg==
X-Gm-Message-State: AOAM533ORySephsE++zHxGp/P5VUAuugsN/xPK4f2dZx3/z72X/EBA2Y
 icxYKilL/AGWEOZmw02StcGz3UjiLBs=
X-Google-Smtp-Source: ABdhPJyNVCaQ4HMTNzA2Re9uzBIaO734glRjMSPooDdj662QrSZE1t9f38JujYtV3nHKxWHrOlFvhw==
X-Received: by 2002:a17:902:ecc1:: with SMTP id
 a1mr7873173plh.111.1644794245942; 
 Sun, 13 Feb 2022 15:17:25 -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 13sm12041058pje.50.2022.02.13.15.17.24
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 13 Feb 2022 15:17:25 -0800 (PST)
From: Chris Marusich <cmmarusich@HIDDEN>
References: <87h7a08kub.fsf@HIDDEN> <87lez5td4n.fsf@HIDDEN>
 <87sftc4osu.fsf@HIDDEN> <87h79slysd.fsf@HIDDEN>
 <87sft13dyv.fsf@HIDDEN> <874k59d802.fsf@HIDDEN>
Date: Sun, 13 Feb 2022 15:17:20 -0800
In-Reply-To: <874k59d802.fsf@HIDDEN> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 08 Feb 2022 10:26:21 +0100")
Message-ID: <87wnhy2w73.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-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: multipart/mixed; boundary="=-=-="

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

Hi Ludo,

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

> How about this:
>
> diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
> index ec071402f4..ac2c79ab65 100644
> --- a/guix/scripts/environment.scm
> +++ b/guix/scripts/environment.scm
> @@ -420,7 +420,7 @@ (define script
>      ;; Script to obtain the list of environment variable values.  On a P=
OSIX
>      ;; shell we can rely on 'set', but on fish we have to use 'env' (fis=
h's
>      ;; 'set' truncates values and prints them in a different format.)
> -    "env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\n")
> +    "PS1=3D; env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; e=
xit\n")
>=20=20
>    (define lines
>      (match (primitive-fork)

Unfortunately, this doesn't quite work.  I tried this patch:

=2D-8<---------------cut here---------------start------------->8---
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 510cee727f..4399a5dd04 100644
=2D-- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -420,7 +420,7 @@ (define script
     ;; Script to obtain the list of environment variable values.  On a POS=
IX
     ;; shell we can rely on 'set', but on fish we have to use 'env' (fish's
     ;; 'set' truncates values and prints them in a different format.)
=2D    "env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\n")
+    "PS1=3D; env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exi=
t\n")
=20
   (define lines
     (match (primitive-fork)
@@ -440,7 +440,7 @@ (define lines
               (result (begin
                         (display script port)
                         (let loop ((lines '()))
=2D                          (match (read-line port)
+                          (match (pk 'read-line (read-line port))
                             ((? eof-object?) (reverse lines))
                             ("GUIX-CHECK-DONE\r"
                              (display "done\n" port)
@@ -458,10 +458,10 @@ (define lines
           ;; but it also truncates values anyway, so don't try to support =
it.
           (let ((index (string-index line #\=3D)))
             (if index
=2D                (vhash-cons (string-take line index)
+                (vhash-cons (pk 'variable line (string-take line index))
                             (string-drop line (+ 1 index))
                             table)
=2D                table)))
+                (pk 'dropped line table))))
         vlist-null
         lines))
=2D-8<---------------cut here---------------end--------------->8---

Here is the output:

=2D-8<---------------cut here---------------start------------->8---
[0] [env] marusich@suzaku:~/guix-master
$ ./pre-inst-env guix shell --check --pure --development guix
guix shell: checking the environment variables visible from shell '/bin/bas=
h'...

;;; (read-line "PS1=3D; env || /usr/bin/env || set; echo GUIX-CHECK-DONE; r=
ead x; exit\r")

;;; (read-line "\x1b[?2004h[0] [env] marusich@suzaku:~/guix-master\r\r")

;;; (read-line "$ PS1=3D; env || /usr/bin/env || set; echo GUIX-CHECK-DONE;=
 read x; exit\r")

;;; (read-line "\x1b[?2004l\rPKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq=
09zm1rj02mivg4h-profile/lib/pkgconfig\r")

;;; (read-line "PWD=3D/home/marusich/guix-master\r")

;;; (read-line "LOGNAME=3Dmarusich\r")

;;; (read-line "GUILE_LOAD_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg=
4h-profile/share/guile/site/3.0\r")

;;; (read-line "HOME=3D/home/marusich\r")

;;; (read-line "LS_COLORS=3Drs=3D0:di=3D01;34:ln=3D01;36:mh=3D00:pi=3D40;33=
:so=3D01;35:do=3D01;35:bd=3D40;33;01:cd=3D40;33;01:or=3D40;31;01:mi=3D00:su=
=3D37;41:sg=3D30;43:ca=3D30;41:tw=3D30;42:ow=3D34;42:st=3D37;44:ex=3D01;32:=
*.tar=3D01;31:*.tgz=3D01;31:*.arc=3D01;31:*.arj=3D01;31:*.taz=3D01;31:*.lha=
=3D01;31:*.lz4=3D01;31:*.lzh=3D01;31:*.lzma=3D01;31:*.tlz=3D01;31:*.txz=3D0=
1;31:*.tzo=3D01;31:*.t7z=3D01;31:*.zip=3D01;31:*.z=3D01;31:*.dz=3D01;31:*.g=
z=3D01;31:*.lrz=3D01;31:*.lz=3D01;31:*.lzo=3D01;31:*.xz=3D01;31:*.zst=3D01;=
31:*.tzst=3D01;31:*.bz2=3D01;31:*.bz=3D01;31:*.tbz=3D01;31:*.tbz2=3D01;31:*=
.tz=3D01;31:*.deb=3D01;31:*.rpm=3D01;31:*.jar=3D01;31:*.war=3D01;31:*.ear=
=3D01;31:*.sar=3D01;31:*.rar=3D01;31:*.alz=3D01;31:*.ace=3D01;31:*.zoo=3D01=
;31:*.cpio=3D01;31:*.7z=3D01;31:*.rz=3D01;31:*.cab=3D01;31:*.wim=3D01;31:*.=
swm=3D01;31:*.dwm=3D01;31:*.esd=3D01;31:*.jpg=3D01;35:*.jpeg=3D01;35:*.mjpg=
=3D01;35:*.mjpeg=3D01;35:*.gif=3D01;35:*.bmp=3D01;35:*.pbm=3D01;35:*.pgm=3D=
01;35:*.ppm=3D01;35:*.tga=3D01;35:*.xbm=3D01;35:*.xpm=3D01;35:*.tif=3D01;35=
:*.tiff=3D01;35:*.png=3D01;35:*.svg=3D01;35:*.svgz=3D01;35:*.mng=3D01;35:*.=
pcx=3D01;35:*.mov=3D01;35:*.mpg=3D01;35:*.mpeg=3D01;35:*.m2v=3D01;35:*.mkv=
=3D01;35:*.webm=3D01;35:*.webp=3D01;35:*.ogm=3D01;35:*.mp4=3D01;35:*.m4v=3D=
01;35:*.mp4v=3D01;35:*.vob=3D01;35:*.qt=3D01;35:*.nuv=3D01;35:*.wmv=3D01;35=
:*.asf=3D01;35:*.rm=3D01;35:*.rmvb=3D01;35:*.flc=3D01;35:*.avi=3D01;35:*.fl=
i=3D01;35:*.flv=3D01;35:*.gl=3D01;35:*.dl=3D01;35:*.xcf=3D01;35:*.xwd=3D01;=
35:*.yuv=3D01;35:*.cgm=3D01;35:*.emf=3D01;35:*.ogv=3D01;35:*.ogx=3D01;35:*.=
aac=3D00;36:*.au=3D00;36:*.flac=3D00;36:*.m4a=3D00;36:*.mid=3D00;36:*.midi=
=3D00;36:*.mka=3D00;36:*.mp3=3D00;36:*.mpc=3D00;36:*.ogg=3D00;36:*.ra=3D00;=
36:*.wav=3D00;36:*.oga=3D00;36:*.opus=3D00;36:*.spx=3D00;36:*.xspf=3D00;36:=
\r")

;;; (read-line "GUILE_LOAD_COMPILED_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm=
1rj02mivg4h-profile/lib/guile/3.0/site-ccache:/gnu/store/hvcq6yjfjjc7060pq0=
9zm1rj02mivg4h-profile/share/guile/site/3.0\r")

;;; (read-line "INFOPATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-prof=
ile/share/info\r")

;;; (read-line "TERM=3Dscreen.xterm-256color\r")

;;; (read-line "CPLUS_INCLUDE_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02m=
ivg4h-profile/include/c++:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi=
le/include\r")

;;; (read-line "ACLOCAL_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-=
profile/share/aclocal\r")

;;; (read-line "USER=3Dmarusich\r")

;;; (read-line "LIBRARY_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-=
profile/lib\r")

;;; (read-line "SHLVL=3D1\r")

;;; (read-line "GUIX_LOCPATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-=
profile/lib/locale\r")

;;; (read-line "GUIX_ENVIRONMENT=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02miv=
g4h-profile\r")

;;; (read-line "PS1=3D\r")

;;; (read-line "PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/=
bin:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/sbin\r")

;;; (read-line "C_INCLUDE_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4=
h-profile/include\r")

;;; (read-line "_=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/bin=
/env\r")

;;; (read-line "GUIX-CHECK-DONE\r")

;;; (variable "PS1=3D; env || /usr/bin/env || set; echo GUIX-CHECK-DONE; re=
ad x; exit" "PS1")

;;; (dropped "\x1b[?2004h[0] [env] marusich@suzaku:~/guix-master\r" #<vhash=
 2b482ca0 1 pairs>)

;;; (variable "$ PS1=3D; env || /usr/bin/env || set; echo GUIX-CHECK-DONE; =
read x; exit" "$ PS1")

;;; (variable "\x1b[?2004l\rPKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq0=
9zm1rj02mivg4h-profile/lib/pkgconfig" "\x1b[?2004l\rPKG_CONFIG_PATH")

;;; (variable "PWD=3D/home/marusich/guix-master" "PWD")

;;; (variable "LOGNAME=3Dmarusich" "LOGNAME")

;;; (variable "GUILE_LOAD_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4=
h-profile/share/guile/site/3.0" "GUILE_LOAD_PATH")

;;; (variable "HOME=3D/home/marusich" "HOME")

;;; (variable "LS_COLORS=3Drs=3D0:di=3D01;34:ln=3D01;36:mh=3D00:pi=3D40;33:=
so=3D01;35:do=3D01;35:bd=3D40;33;01:cd=3D40;33;01:or=3D40;31;01:mi=3D00:su=
=3D37;41:sg=3D30;43:ca=3D30;41:tw=3D30;42:ow=3D34;42:st=3D37;44:ex=3D01;32:=
*.tar=3D01;31:*.tgz=3D01;31:*.arc=3D01;31:*.arj=3D01;31:*.taz=3D01;31:*.lha=
=3D01;31:*.lz4=3D01;31:*.lzh=3D01;31:*.lzma=3D01;31:*.tlz=3D01;31:*.txz=3D0=
1;31:*.tzo=3D01;31:*.t7z=3D01;31:*.zip=3D01;31:*.z=3D01;31:*.dz=3D01;31:*.g=
z=3D01;31:*.lrz=3D01;31:*.lz=3D01;31:*.lzo=3D01;31:*.xz=3D01;31:*.zst=3D01;=
31:*.tzst=3D01;31:*.bz2=3D01;31:*.bz=3D01;31:*.tbz=3D01;31:*.tbz2=3D01;31:*=
.tz=3D01;31:*.deb=3D01;31:*.rpm=3D01;31:*.jar=3D01;31:*.war=3D01;31:*.ear=
=3D01;31:*.sar=3D01;31:*.rar=3D01;31:*.alz=3D01;31:*.ace=3D01;31:*.zoo=3D01=
;31:*.cpio=3D01;31:*.7z=3D01;31:*.rz=3D01;31:*.cab=3D01;31:*.wim=3D01;31:*.=
swm=3D01;31:*.dwm=3D01;31:*.esd=3D01;31:*.jpg=3D01;35:*.jpeg=3D01;35:*.mjpg=
=3D01;35:*.mjpeg=3D01;35:*.gif=3D01;35:*.bmp=3D01;35:*.pbm=3D01;35:*.pgm=3D=
01;35:*.ppm=3D01;35:*.tga=3D01;35:*.xbm=3D01;35:*.xpm=3D01;35:*.tif=3D01;35=
:*.tiff=3D01;35:*.png=3D01;35:*.svg=3D01;35:*.svgz=3D01;35:*.mng=3D01;35:*.=
pcx=3D01;35:*.mov=3D01;35:*.mpg=3D01;35:*.mpeg=3D01;35:*.m2v=3D01;35:*.mkv=
=3D01;35:*.webm=3D01;35:*.webp=3D01;35:*.ogm=3D01;35:*.mp4=3D01;35:*.m4v=3D=
01;35:*.mp4v=3D01;35:*.vob=3D01;35:*.qt=3D01;35:*.nuv=3D01;35:*.wmv=3D01;35=
:*.asf=3D01;35:*.rm=3D01;35:*.rmvb=3D01;35:*.flc=3D01;35:*.avi=3D01;35:*.fl=
i=3D01;35:*.flv=3D01;35:*.gl=3D01;35:*.dl=3D01;35:*.xcf=3D01;35:*.xwd=3D01;=
35:*.yuv=3D01;35:*.cgm=3D01;35:*.emf=3D01;35:*.ogv=3D01;35:*.ogx=3D01;35:*.=
aac=3D00;36:*.au=3D00;36:*.flac=3D00;36:*.m4a=3D00;36:*.mid=3D00;36:*.midi=
=3D00;36:*.mka=3D00;36:*.mp3=3D00;36:*.mpc=3D00;36:*.ogg=3D00;36:*.ra=3D00;=
36:*.wav=3D00;36:*.oga=3D00;36:*.opus=3D00;36:*.spx=3D00;36:*.xspf=3D00;36:=
" "LS_COLORS")

;;; (variable "GUILE_LOAD_COMPILED_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1=
rj02mivg4h-profile/lib/guile/3.0/site-ccache:/gnu/store/hvcq6yjfjjc7060pq09=
zm1rj02mivg4h-profile/share/guile/site/3.0" "GUILE_LOAD_COMPILED_PATH")

;;; (variable "INFOPATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi=
le/share/info" "INFOPATH")

;;; (variable "TERM=3Dscreen.xterm-256color" "TERM")

;;; (variable "CPLUS_INCLUDE_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mi=
vg4h-profile/include/c++:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profil=
e/include" "CPLUS_INCLUDE_PATH")

;;; (variable "ACLOCAL_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-p=
rofile/share/aclocal" "ACLOCAL_PATH")

;;; (variable "USER=3Dmarusich" "USER")

;;; (variable "LIBRARY_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-p=
rofile/lib" "LIBRARY_PATH")

;;; (variable "SHLVL=3D1" "SHLVL")

;;; (variable "GUIX_LOCPATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-p=
rofile/lib/locale" "GUIX_LOCPATH")

;;; (variable "GUIX_ENVIRONMENT=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg=
4h-profile" "GUIX_ENVIRONMENT")

;;; (variable "PS1=3D" "PS1")

;;; (variable "PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/b=
in:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/sbin" "PATH")

;;; (variable "C_INCLUDE_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h=
-profile/include" "C_INCLUDE_PATH")

;;; (variable "_=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/bin/=
env" "_")
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
$=20
=2D-8<---------------cut here---------------end--------------->8---

Most of the interesting stuff happened in the first few lines:

=2D-8<---------------cut here---------------start------------->8---
;;; (read-line "PS1=3D; env || /usr/bin/env || set; echo GUIX-CHECK-DONE; r=
ead x; exit\r")

;;; (read-line "\x1b[?2004h[0] [env] marusich@suzaku:~/guix-master\r\r")

;;; (read-line "$ PS1=3D; env || /usr/bin/env || set; echo GUIX-CHECK-DONE;=
 read x; exit\r")

;;; (read-line "\x1b[?2004l\rPKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq=
09zm1rj02mivg4h-profile/lib/pkgconfig\r")
=2D-8<---------------cut here---------------end--------------->8---

As you can see, nothing good is happening when the code parses this
later on:

=2D-8<---------------cut here---------------start------------->8---
;;; (variable "PS1=3D; env || /usr/bin/env || set; echo GUIX-CHECK-DONE; re=
ad x; exit" "PS1")

;;; (dropped "\x1b[?2004h[0] [env] marusich@suzaku:~/guix-master\r" #<vhash=
 2b482ca0 1 pairs>)

;;; (variable "$ PS1=3D; env || /usr/bin/env || set; echo GUIX-CHECK-DONE; =
read x; exit" "$ PS1")

;;; (variable "\x1b[?2004l\rPKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq0=
9zm1rj02mivg4h-profile/lib/pkgconfig" "\x1b[?2004l\rPKG_CONFIG_PATH")
=2D-8<---------------cut here---------------end--------------->8---

Although I'm sure you see it, for clarity I will explain why the above
is bad: The first variable was actually just the entire script being
echoed back; it is not actually an environment variable.  The second
variable "$ PS1" is also not really an environment variable.  And the
variable "\x1b[?2004l\rPKG_CONFIG_PATH", again, appears to contain
garbage at the start, probably from my PS1 value.

Basically, I think we can work around these issues if we just read and
discard all that junk at the start.  I wasn't able to figure out a
graceful way to force that to happen, but I did find that simply
printing a few lines at the start of the script was good enough to work
around the issue on my computer.  Here's my proposed patch, with
debugging statements included:

=2D-8<---------------cut here---------------start------------->8---
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 510cee727f..35669b39cd 100644
=2D-- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -420,7 +420,8 @@ (define script
     ;; Script to obtain the list of environment variable values.  On a POS=
IX
     ;; shell we can rely on 'set', but on fish we have to use 'env' (fish's
     ;; 'set' truncates values and prints them in a different format.)
=2D    "env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\n")
+    "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")
=20
   (define lines
     (match (primitive-fork)
@@ -439,8 +440,10 @@ (define lines
        (let* ((port   (fdopen controller "r+l"))
               (result (begin
                         (display script port)
+                        (while (not (string=3D? "GUIX_FLUSH_3\r"
+                                              (read-line port))))
                         (let loop ((lines '()))
=2D                          (match (read-line port)
+                          (match (pk 'read-line (read-line port))
                             ((? eof-object?) (reverse lines))
                             ("GUIX-CHECK-DONE\r"
                              (display "done\n" port)
@@ -458,10 +461,10 @@ (define lines
           ;; but it also truncates values anyway, so don't try to support =
it.
           (let ((index (string-index line #\=3D)))
             (if index
=2D                (vhash-cons (string-take line index)
+                (vhash-cons (pk 'variable line (string-take line index))
                             (string-drop line (+ 1 index))
                             table)
=2D                table)))
+                (pk 'dropped line table))))
         vlist-null
         lines))
=20
=2D-8<---------------cut here---------------end--------------->8---

And here's the output:

=2D-8<---------------cut here---------------start------------->8---
[0] [env] marusich@suzaku:~/guix-master
$ ./pre-inst-env guix shell --check --pure --development guix
guix shell: checking the environment variables visible from shell '/bin/bas=
h'...

;;; (read-line "PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg=
4h-profile/lib/pkgconfig\r")

;;; (read-line "PWD=3D/home/marusich/guix-master\r")

;;; (read-line "LOGNAME=3Dmarusich\r")

;;; (read-line "GUILE_LOAD_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg=
4h-profile/share/guile/site/3.0\r")

;;; (read-line "HOME=3D/home/marusich\r")

;;; (read-line "LS_COLORS=3Drs=3D0:di=3D01;34:ln=3D01;36:mh=3D00:pi=3D40;33=
:so=3D01;35:do=3D01;35:bd=3D40;33;01:cd=3D40;33;01:or=3D40;31;01:mi=3D00:su=
=3D37;41:sg=3D30;43:ca=3D30;41:tw=3D30;42:ow=3D34;42:st=3D37;44:ex=3D01;32:=
*.tar=3D01;31:*.tgz=3D01;31:*.arc=3D01;31:*.arj=3D01;31:*.taz=3D01;31:*.lha=
=3D01;31:*.lz4=3D01;31:*.lzh=3D01;31:*.lzma=3D01;31:*.tlz=3D01;31:*.txz=3D0=
1;31:*.tzo=3D01;31:*.t7z=3D01;31:*.zip=3D01;31:*.z=3D01;31:*.dz=3D01;31:*.g=
z=3D01;31:*.lrz=3D01;31:*.lz=3D01;31:*.lzo=3D01;31:*.xz=3D01;31:*.zst=3D01;=
31:*.tzst=3D01;31:*.bz2=3D01;31:*.bz=3D01;31:*.tbz=3D01;31:*.tbz2=3D01;31:*=
.tz=3D01;31:*.deb=3D01;31:*.rpm=3D01;31:*.jar=3D01;31:*.war=3D01;31:*.ear=
=3D01;31:*.sar=3D01;31:*.rar=3D01;31:*.alz=3D01;31:*.ace=3D01;31:*.zoo=3D01=
;31:*.cpio=3D01;31:*.7z=3D01;31:*.rz=3D01;31:*.cab=3D01;31:*.wim=3D01;31:*.=
swm=3D01;31:*.dwm=3D01;31:*.esd=3D01;31:*.jpg=3D01;35:*.jpeg=3D01;35:*.mjpg=
=3D01;35:*.mjpeg=3D01;35:*.gif=3D01;35:*.bmp=3D01;35:*.pbm=3D01;35:*.pgm=3D=
01;35:*.ppm=3D01;35:*.tga=3D01;35:*.xbm=3D01;35:*.xpm=3D01;35:*.tif=3D01;35=
:*.tiff=3D01;35:*.png=3D01;35:*.svg=3D01;35:*.svgz=3D01;35:*.mng=3D01;35:*.=
pcx=3D01;35:*.mov=3D01;35:*.mpg=3D01;35:*.mpeg=3D01;35:*.m2v=3D01;35:*.mkv=
=3D01;35:*.webm=3D01;35:*.webp=3D01;35:*.ogm=3D01;35:*.mp4=3D01;35:*.m4v=3D=
01;35:*.mp4v=3D01;35:*.vob=3D01;35:*.qt=3D01;35:*.nuv=3D01;35:*.wmv=3D01;35=
:*.asf=3D01;35:*.rm=3D01;35:*.rmvb=3D01;35:*.flc=3D01;35:*.avi=3D01;35:*.fl=
i=3D01;35:*.flv=3D01;35:*.gl=3D01;35:*.dl=3D01;35:*.xcf=3D01;35:*.xwd=3D01;=
35:*.yuv=3D01;35:*.cgm=3D01;35:*.emf=3D01;35:*.ogv=3D01;35:*.ogx=3D01;35:*.=
aac=3D00;36:*.au=3D00;36:*.flac=3D00;36:*.m4a=3D00;36:*.mid=3D00;36:*.midi=
=3D00;36:*.mka=3D00;36:*.mp3=3D00;36:*.mpc=3D00;36:*.ogg=3D00;36:*.ra=3D00;=
36:*.wav=3D00;36:*.oga=3D00;36:*.opus=3D00;36:*.spx=3D00;36:*.xspf=3D00;36:=
\r")

;;; (read-line "GUILE_LOAD_COMPILED_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm=
1rj02mivg4h-profile/lib/guile/3.0/site-ccache:/gnu/store/hvcq6yjfjjc7060pq0=
9zm1rj02mivg4h-profile/share/guile/site/3.0\r")

;;; (read-line "INFOPATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-prof=
ile/share/info\r")

;;; (read-line "TERM=3Dscreen.xterm-256color\r")

;;; (read-line "CPLUS_INCLUDE_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02m=
ivg4h-profile/include/c++:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi=
le/include\r")

;;; (read-line "ACLOCAL_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-=
profile/share/aclocal\r")

;;; (read-line "USER=3Dmarusich\r")

;;; (read-line "LIBRARY_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-=
profile/lib\r")

;;; (read-line "SHLVL=3D1\r")

;;; (read-line "GUIX_LOCPATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-=
profile/lib/locale\r")

;;; (read-line "GUIX_ENVIRONMENT=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02miv=
g4h-profile\r")

;;; (read-line "PS1=3D\r")

;;; (read-line "PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/=
bin:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/sbin\r")

;;; (read-line "C_INCLUDE_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4=
h-profile/include\r")

;;; (read-line "_=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/bin=
/env\r")

;;; (read-line "GUIX-CHECK-DONE\r")

;;; (variable "PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4=
h-profile/lib/pkgconfig" "PKG_CONFIG_PATH")

;;; (variable "PWD=3D/home/marusich/guix-master" "PWD")

;;; (variable "LOGNAME=3Dmarusich" "LOGNAME")

;;; (variable "GUILE_LOAD_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4=
h-profile/share/guile/site/3.0" "GUILE_LOAD_PATH")

;;; (variable "HOME=3D/home/marusich" "HOME")

;;; (variable "LS_COLORS=3Drs=3D0:di=3D01;34:ln=3D01;36:mh=3D00:pi=3D40;33:=
so=3D01;35:do=3D01;35:bd=3D40;33;01:cd=3D40;33;01:or=3D40;31;01:mi=3D00:su=
=3D37;41:sg=3D30;43:ca=3D30;41:tw=3D30;42:ow=3D34;42:st=3D37;44:ex=3D01;32:=
*.tar=3D01;31:*.tgz=3D01;31:*.arc=3D01;31:*.arj=3D01;31:*.taz=3D01;31:*.lha=
=3D01;31:*.lz4=3D01;31:*.lzh=3D01;31:*.lzma=3D01;31:*.tlz=3D01;31:*.txz=3D0=
1;31:*.tzo=3D01;31:*.t7z=3D01;31:*.zip=3D01;31:*.z=3D01;31:*.dz=3D01;31:*.g=
z=3D01;31:*.lrz=3D01;31:*.lz=3D01;31:*.lzo=3D01;31:*.xz=3D01;31:*.zst=3D01;=
31:*.tzst=3D01;31:*.bz2=3D01;31:*.bz=3D01;31:*.tbz=3D01;31:*.tbz2=3D01;31:*=
.tz=3D01;31:*.deb=3D01;31:*.rpm=3D01;31:*.jar=3D01;31:*.war=3D01;31:*.ear=
=3D01;31:*.sar=3D01;31:*.rar=3D01;31:*.alz=3D01;31:*.ace=3D01;31:*.zoo=3D01=
;31:*.cpio=3D01;31:*.7z=3D01;31:*.rz=3D01;31:*.cab=3D01;31:*.wim=3D01;31:*.=
swm=3D01;31:*.dwm=3D01;31:*.esd=3D01;31:*.jpg=3D01;35:*.jpeg=3D01;35:*.mjpg=
=3D01;35:*.mjpeg=3D01;35:*.gif=3D01;35:*.bmp=3D01;35:*.pbm=3D01;35:*.pgm=3D=
01;35:*.ppm=3D01;35:*.tga=3D01;35:*.xbm=3D01;35:*.xpm=3D01;35:*.tif=3D01;35=
:*.tiff=3D01;35:*.png=3D01;35:*.svg=3D01;35:*.svgz=3D01;35:*.mng=3D01;35:*.=
pcx=3D01;35:*.mov=3D01;35:*.mpg=3D01;35:*.mpeg=3D01;35:*.m2v=3D01;35:*.mkv=
=3D01;35:*.webm=3D01;35:*.webp=3D01;35:*.ogm=3D01;35:*.mp4=3D01;35:*.m4v=3D=
01;35:*.mp4v=3D01;35:*.vob=3D01;35:*.qt=3D01;35:*.nuv=3D01;35:*.wmv=3D01;35=
:*.asf=3D01;35:*.rm=3D01;35:*.rmvb=3D01;35:*.flc=3D01;35:*.avi=3D01;35:*.fl=
i=3D01;35:*.flv=3D01;35:*.gl=3D01;35:*.dl=3D01;35:*.xcf=3D01;35:*.xwd=3D01;=
35:*.yuv=3D01;35:*.cgm=3D01;35:*.emf=3D01;35:*.ogv=3D01;35:*.ogx=3D01;35:*.=
aac=3D00;36:*.au=3D00;36:*.flac=3D00;36:*.m4a=3D00;36:*.mid=3D00;36:*.midi=
=3D00;36:*.mka=3D00;36:*.mp3=3D00;36:*.mpc=3D00;36:*.ogg=3D00;36:*.ra=3D00;=
36:*.wav=3D00;36:*.oga=3D00;36:*.opus=3D00;36:*.spx=3D00;36:*.xspf=3D00;36:=
" "LS_COLORS")

;;; (variable "GUILE_LOAD_COMPILED_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1=
rj02mivg4h-profile/lib/guile/3.0/site-ccache:/gnu/store/hvcq6yjfjjc7060pq09=
zm1rj02mivg4h-profile/share/guile/site/3.0" "GUILE_LOAD_COMPILED_PATH")

;;; (variable "INFOPATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi=
le/share/info" "INFOPATH")

;;; (variable "TERM=3Dscreen.xterm-256color" "TERM")

;;; (variable "CPLUS_INCLUDE_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mi=
vg4h-profile/include/c++:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profil=
e/include" "CPLUS_INCLUDE_PATH")

;;; (variable "ACLOCAL_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-p=
rofile/share/aclocal" "ACLOCAL_PATH")

;;; (variable "USER=3Dmarusich" "USER")

;;; (variable "LIBRARY_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-p=
rofile/lib" "LIBRARY_PATH")

;;; (variable "SHLVL=3D1" "SHLVL")

;;; (variable "GUIX_LOCPATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-p=
rofile/lib/locale" "GUIX_LOCPATH")

;;; (variable "GUIX_ENVIRONMENT=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg=
4h-profile" "GUIX_ENVIRONMENT")

;;; (variable "PS1=3D" "PS1")

;;; (variable "PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/b=
in:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/sbin" "PATH")

;;; (variable "C_INCLUDE_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h=
-profile/include" "C_INCLUDE_PATH")

;;; (variable "_=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/bin/=
env" "_")
guix shell: All is good!  The shell gets correct environment variables.
[0] [env] marusich@suzaku:~/guix-master
$=20
=2D-8<---------------cut here---------------end--------------->8---

As you can see, it seems to be working correctly here.

Here's a version of the patch that is ready for committing, with the
debug statements removed and comments added:


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: inline;
 filename=0001-environment-Prevent-PS1-from-clobbering-output-in-ch.patch
Content-Transfer-Encoding: quoted-printable
Content-Description: [PATCH] environment: Prevent PS1 from clobbering output in 'check'.

From=20c3eea81846ae71a246e6b592be74062f4bf26474 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 'check'.

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 lines up
to and including the last sentinel line.  After that, read the remaining li=
nes
as usual.
=2D--
 guix/scripts/environment.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index ec071402f4..0b137467f9 100644
=2D-- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -2,6 +2,7 @@
 ;;; Copyright =C2=A9 2014, 2015, 2018 David Thompson <davet@HIDDEN>
 ;;; Copyright =C2=A9 2015-2022 Ludovic Court=C3=A8s <ludo@HIDDEN>
 ;;; Copyright =C2=A9 2018 Mike Gerwitz <mtg@HIDDEN>
+;;; Copyright =C2=A9 2022 Chris Marusich <cmmarusich@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -420,7 +421,16 @@ by running 'set' in the shell."
     ;; Script to obtain the list of environment variable values.  On a POS=
IX
     ;; shell we can rely on 'set', but on fish we have to use 'env' (fish's
     ;; 'set' truncates values and prints them in a different format.)
=2D    "env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\n")
+    ;;
+    ;; 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.  I=
f we
+    ;; don't do this, the original PS1 value can sometimes get interleaved
+    ;; into the output, which interferes with our parsing logic.  It's a h=
ack,
+    ;; but in practice it seems to do the job.  If you know of a more grac=
eful
+    ;; solution, please implement it!  See: https://issues.guix.gnu.org/51=
466
+    "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")
=20
   (define lines
     (match (primitive-fork)
@@ -439,6 +449,12 @@ by running 'set' in the shell."
        (let* ((port   (fdopen controller "r+l"))
               (result (begin
                         (display script port)
+                        ;; Ignore all lines up to and including the final
+                        ;; "GUIX_FLUSH" line.
+                        (while (not (string=3D? "GUIX_FLUSH_3\r"
+                                              (read-line port))))
+                        ;; Now (hopefully) the original PS1 value will not=
 be
+                        ;; interleaved in the remaining lines.
                         (let loop ((lines '()))
                           (match (read-line port)
                             ((? eof-object?) (reverse lines))

base-commit: d65979c46c99dc36324ca94aa9650b9de37f22de
=2D-=20
2.26.3


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


And here's its output:

=2D-8<---------------cut here---------------start------------->8---
[0] [env] marusich@suzaku:~/guix-master
$ ./pre-inst-env guix shell --check --pure --development guix
guix shell: checking the environment variables visible from shell '/bin/bas=
h'...
guix shell: All is good!  The shell gets correct environment variables.
[0] [env] marusich@suzaku:~/guix-master
$=20
=2D-8<---------------cut here---------------end--------------->8---

WDYT?

=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+x3UCaFdgiRp0FAmIJkYAVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkad/DIP/0cK4RtFfWrzLm87ZjPnWDKVkUN8
12GYm6uWgFAImqcmS8ZH9lep6o6lhyJSYqQ1Vpv15XdUrg5o7jwQlCWU595JaWZH
AxwhAjZA2rOaibtftiuKJN7awJUoSt+XJpYWEJVoajz0DS7hh6HVMLbmf441S+HB
fX5eY7JPQSbJk9o0owXyZB3KkGl5fkwy2XNLnPqUXIH+bcU3xL4CO2qH3EUzmFKN
K5UVSo7IzyVBj6DH0w3CQWxTioQxfdZJvy9W5qK4DPx4r+c+teEnGqoHm0RO0e6x
r5Woy5v0bC3rOSrT1jxcQW7S4ClzxmTbPfwVyvPN09IB1fTabGoqBVAFDTdn0tCv
K3OQnTK+0PwSMdlcVX3QvZGSByylTu/AqMM7UFgt+kd867Og5hOHHWRdHfm1t9Lv
61BGcS6tg0qTSQZbwCcilBHWm5ZhnJyLD6BL3c7gzvPt6I+UyM3XdBARHOyUMoVB
DrZ9T5jh+RGw65oRnDLnIQdYCZk7cS3dZ5YFH+5xrpNf7kltdCPGZnNT+mORsGxJ
tqiEhZF+XF2aoaGiP7FdK2gl/p2A4A3Ouoo0uoStWjal0WhVD0oE7GNueC/nqnst
y36MQBnU0IX5BXZF9uPxPklRFhMc1XkAGo3o1mxD5Oczua/0Mrg+A1svi8oaFVaz
S1G97WFENNuMlvNL
=CTxU
-----END PGP SIGNATURE-----
--==-=-=--




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 14 Feb 2022 09:49:02 +0000
Resent-Message-ID: <handler.51466.B51466.164483208426414 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>
Cc: 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.164483208426414
          (code B ref 51466); Mon, 14 Feb 2022 09:49:02 +0000
Received: (at 51466) by debbugs.gnu.org; 14 Feb 2022 09:48:04 +0000
Received: from localhost ([127.0.0.1]:39791 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nJXxk-0006ry-7j
	for submit <at> debbugs.gnu.org; Mon, 14 Feb 2022 04:48:04 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:33224)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1nJXxh-0006rK-0W
 for 51466 <at> debbugs.gnu.org; Mon, 14 Feb 2022 04:48:02 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 567884E1;
 Mon, 14 Feb 2022 10:47:54 +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 JzYm6IAPnjLx; Mon, 14 Feb 2022 10:47: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 0C8BC3BE;
 Mon, 14 Feb 2022 10:47:53 +0100 (CET)
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
References: <87h7a08kub.fsf@HIDDEN> <87lez5td4n.fsf@HIDDEN>
 <87sftc4osu.fsf@HIDDEN> <87h79slysd.fsf@HIDDEN>
 <87sft13dyv.fsf@HIDDEN> <874k59d802.fsf@HIDDEN>
 <87wnhy2w73.fsf_-_@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 26 =?UTF-8?Q?Pluvi=C3=B4se?= an 230 de la
 =?UTF-8?Q?R=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: Mon, 14 Feb 2022 10:47:52 +0100
In-Reply-To: <87wnhy2w73.fsf_-_@HIDDEN> (Chris Marusich's message of "Sun, 
 13 Feb 2022 15:17:20 -0800")
Message-ID: <878rudzsmv.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: 567884E1
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-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,

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 'chec=
k'.
>
> 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 t=
he
> environment variables.  In the parent process, read and discard all lines=
 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 interleav=
ed
> +    ;; 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 gr=
aceful
> +    ;; 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.




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 08 Mar 2022 19:08:02 +0000
Resent-Message-ID: <handler.51466.B51466.164676645215384 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.164676645215384
          (code B ref 51466); Tue, 08 Mar 2022 19:08:02 +0000
Received: (at 51466) by debbugs.gnu.org; 8 Mar 2022 19:07:32 +0000
Received: from localhost ([127.0.0.1]:57948 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-000403-Ee
	for submit <at> debbugs.gnu.org; Tue, 08 Mar 2022 14:07:32 -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: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
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?="'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-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.




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: [PATCH 0/1] environment: properly parse environment variables during --check
References: <87r1c5c6gk.fsf@ponder>
In-Reply-To: <87r1c5c6gk.fsf@ponder>
Resent-From: Kevin Boulain <kevinboulain@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sun, 27 Mar 2022 17:00:02 +0000
Resent-Message-ID: <handler.51466.B51466.164840036722618 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: 51466 <at> debbugs.gnu.org
Cc: Kevin Boulain <kevinboulain@HIDDEN>
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.164840036722618
          (code B ref 51466); Sun, 27 Mar 2022 17:00:02 +0000
Received: (at 51466) by debbugs.gnu.org; 27 Mar 2022 16:59:27 +0000
Received: from localhost ([127.0.0.1]:56484 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nYWEg-0005sk-Sx
	for submit <at> debbugs.gnu.org; Sun, 27 Mar 2022 12:59:27 -0400
Received: from mail-ej1-f47.google.com ([209.85.218.47]:45970)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kevinboulain@HIDDEN>) id 1nYWEe-0005sP-KZ
 for 51466 <at> debbugs.gnu.org; Sun, 27 Mar 2022 12:59:24 -0400
Received: by mail-ej1-f47.google.com with SMTP id qa43so24183994ejc.12
 for <51466 <at> debbugs.gnu.org>; Sun, 27 Mar 2022 09:59:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:date:message-id:mime-version
 :content-transfer-encoding;
 bh=HMv6W3L7ceA9jgGujKkPJEk+ywO4NmuCvCH4hYA0LQA=;
 b=CCIfhwlT43bknIlEJjWSOackGvViA9guC9AgnKBUR5TAybZ3KoORmw/H452xcwsWM6
 LgOGxsAAx72lg6AAQSvLKDyViT8sW/y10winsMhAAlbl3FrOyeCl/OOGls9LP+1LZX2M
 MFMKTUa8JufOc7QVqXlA1tzizhSSNV/gEpMAdEsAqFkaYeTBw46VLO4ZC3LjEsCwjWBL
 1nywyN0c9yHGr7EUL1uOIToOIoXUMjMgYcWNPcxwSsg3QI16DXwiA1K8sR629RdbubYI
 WCRnlIApWaq8B3QIc4NTDTgnla7Rk6r3Y4VlSpaqnSYhShyQp7fSIsE6qZPKuhmRPEDq
 C1wA==
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:date:message-id:mime-version
 :content-transfer-encoding;
 bh=HMv6W3L7ceA9jgGujKkPJEk+ywO4NmuCvCH4hYA0LQA=;
 b=JEF1IwfEoFljvRoA2LZSL/Jcm/3WPe6z+Ejj4NoMai9SM3dW50OiEPNRmZl/Cx7EAq
 Lc5cFEu06qTl6vux3BOZZ+ZW0JD22Obvt4PCrkBVvVan2ff1LcCFsVZYkKHaWwrbtNKB
 xLlbVgFWVt6yvGVSVIQuHSMtckxe1C99i+leJpiO2Ao+loocHONXV2XTfekbPYXQB+3r
 apjMXh1Sfs8HgPJj7cLlzFgtuMTEGx0H8qX+6/bChYhbky67EaGWxs0FZNFmPzLgvzDd
 1/iAxa06GrFWFGgwhgicKo7qnyzs7EK9tMJXTdPPj+XG9oaJ+Gfq7xdisU9wX2Nvk8Q6
 GNOg==
X-Gm-Message-State: AOAM5321Njv8C8htBZfh+ZUu++DfD+sm2MqRUf3MzEg/6AK3KTPaYP1q
 SrbQnKDSpq6ANv84lqfxg6PzK90k5Ps=
X-Google-Smtp-Source: ABdhPJzze2ebTKOzH0ezI+GEaLA/Xj9O87i1kYPeQ/M/bD8j/oeGzLW+WEH22NFTra2LuuPJLWq3xA==
X-Received: by 2002:a17:907:7ba6:b0:6df:ee7d:10f2 with SMTP id
 ne38-20020a1709077ba600b006dfee7d10f2mr23308594ejc.98.1648400358368; 
 Sun, 27 Mar 2022 09:59:18 -0700 (PDT)
Received: from localhost.localdomain ([51.154.70.17])
 by smtp.gmail.com with ESMTPSA id
 q2-20020a170906144200b006ceb8723de9sm4786243ejc.120.2022.03.27.09.59.17
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 27 Mar 2022 09:59:17 -0700 (PDT)
From: Kevin Boulain <kevinboulain@HIDDEN>
Date: Sun, 27 Mar 2022 19:01:23 +0200
Message-Id: <20220327170124.2846-1-kevinboulain@HIDDEN>
X-Mailer: git-send-email 2.34.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
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 (-)

The PS1=; for i in 1 2 3; do echo GUIX_FLUSH_$i; done; hack appears to work
for me but here is my alternate version. I don't think we have to hack our way
around the shell if we can dump the environment variables somewhere else.

I added a test but the potato machine I'm running that on is taking a very
long time to run the whole thing (I did run the test in isolation with and
without my patch), would you mind checking it works for you (and can we use
Bash there?).

Note I'm still not sure why we have env || /usr/bin/env (in case we mess with
the PATH I guess?) so I've kept it.

Comments welcome, I haven't coded much in Guile/Scheme.

Kevin Boulain (1):
  environment: properly parse environment variables during --check

 guix/scripts/environment.scm | 65 +++++++++++++++++++++++-------------
 tests/guix-environment.sh    | 16 +++++++++
 2 files changed, 57 insertions(+), 24 deletions(-)





Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: [PATCH 1/1] environment: properly parse environment variables during --check
Resent-From: Kevin Boulain <kevinboulain@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sun, 27 Mar 2022 17:00:03 +0000
Resent-Message-ID: <handler.51466.B51466.164840036922631 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: 51466 <at> debbugs.gnu.org
Cc: Kevin Boulain <kevinboulain@HIDDEN>
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.164840036922631
          (code B ref 51466); Sun, 27 Mar 2022 17:00:03 +0000
Received: (at 51466) by debbugs.gnu.org; 27 Mar 2022 16:59:29 +0000
Received: from localhost ([127.0.0.1]:56486 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nYWEj-0005sx-30
	for submit <at> debbugs.gnu.org; Sun, 27 Mar 2022 12:59:29 -0400
Received: from mail-ej1-f51.google.com ([209.85.218.51]:39771)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kevinboulain@HIDDEN>) id 1nYWEf-0005sR-O1
 for 51466 <at> debbugs.gnu.org; Sun, 27 Mar 2022 12:59:26 -0400
Received: by mail-ej1-f51.google.com with SMTP id dr20so24208355ejc.6
 for <51466 <at> debbugs.gnu.org>; Sun, 27 Mar 2022 09:59:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=hh+/yP0VKKJunTnXq4xDB/1DhEK360hpOM44ZzirqOQ=;
 b=iLfx1r3KTEeotus7cz0D0Gy93uft+sBi0E8qdyE553d6CPY7o8zGZk+YqYa5ICxuWl
 3wmkITesjT0edl9HkwZaUMGoS2M8NEPTLEDYxhoA9f3v3GQKaPiuyk1fRzgKiEcv1vZi
 TfiXhTiFnYwRn/QAwVN7c3Izk97EZXXvZpcyx3ZRWHaFb9JiH4JHLHSj+Gn9HI53xDtG
 YKDt1lwgJtHUIBcA4a8yt21YXuFbsAuMDaZNS/cl15oE5Gvy7FkoJEgh7kA9Ee49sISF
 48nYacRcUoKjKs//Tk2mFYEVzLpuNC8YprGAlUyxEhAxvSqiiq+LFmbhOkj2zNOQsTCR
 ZmhQ==
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:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=hh+/yP0VKKJunTnXq4xDB/1DhEK360hpOM44ZzirqOQ=;
 b=6vgxwDp8CMANoLT5dfKKImQvVurX5L3ZJW3llKVhZgCaB1G5l8psroco/OY+lHk3vy
 NqpbTFKBCnPjIu+7Yc9/dPKM2LVRLkm3cIUJY7fTIZ+M2duJyfiRecGiUqCznOa9Z5a8
 i40KUiR+x9OwGcB/ryS6pNr/ZB9u5L16zcPXAvjmTNqFAGCO9lI0GyTWFbRxrZUUjr+7
 l4eaH81HUQNJA8uJlEmprmqLOt+0UpXq0nqgoDo/YqpUhR7jle4USsVfbTZs1YXgJr7x
 ddJ7447Owpqb713pCrGahFD8cBzTI3Xmgc2nmwtKEymB/1iFhA0rgqiuWFkbM+XWqbuQ
 o+hg==
X-Gm-Message-State: AOAM530vRZ3V9w93DxAYHugeg4G0FnZR55yQ32a490Rv6+89m+w7KtZP
 GB3ni7MPzcO/o1Q3YEYD8CNwKl659BQ=
X-Google-Smtp-Source: ABdhPJxZ8EnEc88oxiRfZRs/ePai28lEZd2NIEv+OFRbV3TnfldkDAQwCVa2SehVoxzMaAzClX4Usg==
X-Received: by 2002:a17:907:72cc:b0:6e0:2d3:bcba with SMTP id
 du12-20020a17090772cc00b006e002d3bcbamr22772349ejc.642.1648400359745; 
 Sun, 27 Mar 2022 09:59:19 -0700 (PDT)
Received: from localhost.localdomain ([51.154.70.17])
 by smtp.gmail.com with ESMTPSA id
 q2-20020a170906144200b006ceb8723de9sm4786243ejc.120.2022.03.27.09.59.19
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 27 Mar 2022 09:59:19 -0700 (PDT)
From: Kevin Boulain <kevinboulain@HIDDEN>
Date: Sun, 27 Mar 2022 19:01:24 +0200
Message-Id: <20220327170124.2846-2-kevinboulain@HIDDEN>
X-Mailer: git-send-email 2.34.0
In-Reply-To: <20220327170124.2846-1-kevinboulain@HIDDEN>
References: <20220327170124.2846-1-kevinboulain@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
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 (-)

Should solve https://issues.guix.gnu.org/51466.

This redirects the env command's output to a temporary file so that
there is no way to get it mixed with the shell's output (like PS1).
Additionnally:
 - Remove GUIX-CHECK-DONE and read: I don't think there is a need for
   them as discarding the output until the shell exits is enough to
   guarantee the environment has been dumped. Sadly, Linux doesn't
   report EOF but EIO when the shell exits and the pty gets closed hence
   the catch/throw.
 - Don't try to parse environment variables by splitting them on \n,
   instead use env's -0 option to separate environment variables with
   \0. This prevent incorrect parsing of some multi-line variables
   (e.g.: f() { echo "hello"; }; declare -fx f) but isn't standard.

* guix/scripts/environment.scm (child-shell-environment): make
environment variables parsing more robust.
* tests/guix-environment.sh: add a simple test that was reliably
failing on my machine.
---
 guix/scripts/environment.scm | 65 +++++++++++++++++++++++-------------
 tests/guix-environment.sh    | 16 +++++++++
 2 files changed, 57 insertions(+), 24 deletions(-)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index ec071402f4..4ff13c6bde 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -48,7 +48,7 @@ (define-module (guix scripts environment)
   #:autoload   (gnu packages bash) (bash)
   #:autoload   (gnu packages bootstrap) (bootstrap-executable %bootstrap-guile)
   #:use-module (ice-9 match)
-  #:autoload   (ice-9 rdelim) (read-line)
+  #:autoload   (ice-9 rdelim) (read-delimited read-line)
   #:use-module (ice-9 vlist)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-11)
@@ -413,16 +413,22 @@ (define (child-shell-environment shell profile manifest)
   "Create a child process, load PROFILE and MANIFEST, and then run SHELL in
 interactive mode in it.  Return a name/value vhash for all the variables shown
 by running 'set' in the shell."
-  (define-values (controller inferior)
-    (openpty))
-
-  (define script
-    ;; Script to obtain the list of environment variable values.  On a POSIX
-    ;; shell we can rely on 'set', but on fish we have to use 'env' (fish's
-    ;; 'set' truncates values and prints them in a different format.)
-    "env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\n")
-
   (define lines
+    (let* ((environment-port (mkstemp "/tmp/guix-enviroment-XXXXXX"))
+           (environment-file (port-filename environment-port))
+           ;; Script to obtain the list of environment variable values.  On a
+           ;; POSIX shell we can rely on 'set', but on fish we have to use 'env'
+           ;; (fish's 'set' truncates values and prints them in a different
+           ;; format.)
+           ;; We rely on env --null to mark the end of environment variables.
+           ;; This is expected to be safe because POSIX defines environment
+           ;; variables end with '\0' (but does't document the --null option).
+           ;; Some shells, like Bash, allow to export functions, which will span
+           ;; multiple lines and break any trivial parsing relying on '\n'.
+           (script (format #f "env --null > ~a || /usr/bin/env --null > ~a; exit\n"
+                           environment-file environment-file)))
+
+      (let-values (((controller inferior) (openpty)))
         (match (primitive-fork)
           (0
            (catch #t
@@ -436,26 +442,37 @@ (define lines
                (primitive-exit 127))))
           (pid
            (close-fdes inferior)
-       (let* ((port   (fdopen controller "r+l"))
-              (result (begin
+           (let ((port (fdopen controller "r+l")))
              (display script port)
+             (catch 'system-error
+               (lambda ()
+                 ;; We aren't interested in the output of the shell itself,
+                 ;; drop it.
+                 (while (not (eof-object? (read-line port)))))
+               (lambda args
+                 (let ((errno (system-error-errno args)))
+                   (cond
+                    ((= errno EIO)
+                     ;; On Linux, a read won't return EOF but will fail with EIO
+                     ;; when the device is closed:
+                     ;; https://bugs.python.org/issue5380#msg252544
+                     #t)
+                    (#t
+                     (apply throw args))))))
+             (close-port port)
+             (waitpid pid)))))
+
+      (let ((result (begin
                       (let loop ((lines '()))
-                          (match (read-line port)
+                        (match (read-delimited "\0" environment-port)
                           ((? eof-object?) (reverse lines))
-                            ("GUIX-CHECK-DONE\r"
-                             (display "done\n" port)
-                             (reverse lines))
                           (line
-                             ;; Drop the '\r' from LINE.
-                             (loop (cons (string-drop-right line 1)
-                                         lines))))))))
-         (close-port port)
-         (waitpid pid)
-         result))))
+                             (loop (cons line lines))))))))
+        (close-port environment-port)
+        (delete-file environment-file)
+        result)))
 
   (fold (lambda (line table)
-          ;; Note: 'set' in fish outputs "NAME VALUE" instead of "NAME=VALUE"
-          ;; but it also truncates values anyway, so don't try to support it.
           (let ((index (string-index line #\=)))
             (if index
                 (vhash-cons (string-take line index)
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index 95fe95b437..114bf9fbf5 100644
--- a/tests/guix-environment.sh
+++ b/tests/guix-environment.sh
@@ -258,3 +258,19 @@ then
 	guix gc --references "$profile" | grep "$dep"
     done
 fi
+
+# https://issues.guix.gnu.org/51466
+# guix environment --check was sometimes unable to find PKG_CONFIG_PATH
+# because the env command is sent before the prompt gets printed and there
+# is no proper way to deinterleave streams:
+#  ;;; (read-line "env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\r")
+#  ;;; (read-line "bash-5.1$ PKG_CONFIG_PATH=/gnu/store/0ysl5arpf0yf3pn15afr450k676lgdq3-profile/lib/pkgconfig\r")
+#  ;;; (read-line "PWD=/home/ether/source/guix\r")
+bash=$(mktemp)
+cat > "$bash" << 'BASH'
+#!/usr/bin/env bash
+exec bash --noprofile --rcfile /dev/null "$@"
+BASH
+chmod +x "$bash"
+env SHELL=$bash guix environment --check --pure guix -- env
+rm -f "$bash"




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Fri, 20 May 2022 21:38:01 +0000
Resent-Message-ID: <handler.51466.B51466.165308263312727 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165308263312727
          (code B ref 51466); Fri, 20 May 2022 21:38:01 +0000
Received: (at 51466) by debbugs.gnu.org; 20 May 2022 21:37:13 +0000
Received: from localhost ([127.0.0.1]:40230 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-0003JC-1A
	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: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
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?="'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-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.




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Chris Marusich <cmmarusich@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 24 May 2022 04:43:02 +0000
Resent-Message-ID: <handler.51466.B51466.165336736725645 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165336736725645
          (code B ref 51466); Tue, 24 May 2022 04:43:02 +0000
Received: (at 51466) by debbugs.gnu.org; 24 May 2022 04:42:47 +0000
Received: from localhost ([127.0.0.1]:50676 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ntMNa-0006fZ-Hc
	for submit <at> debbugs.gnu.org; Tue, 24 May 2022 00:42:46 -0400
Received: from mail-pj1-f53.google.com ([209.85.216.53]:42585)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cmmarusich@HIDDEN>)
 id 1ntMNZ-0006fJ-Ju; Tue, 24 May 2022 00:42:46 -0400
Received: by mail-pj1-f53.google.com with SMTP id
 cs3-20020a17090af50300b001e0808b5838so172190pjb.1; 
 Mon, 23 May 2022 21:42:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:in-reply-to:references:user-agent:date
 :message-id:mime-version;
 bh=FyVdNXjH+IFW6AjTnaVP7nuT0I3g6b4rFTMUIs0Feuk=;
 b=hVZ4uRfOKxSq+pxv4ZcniSZkl+WQ1maybsJZCks1nHR0lAmAiBSga8IGPocFHdmFpQ
 xtPLSOnm9guBXBS1mVsL6ta851GtKx1jSIf1fLTp/l8QWymWfCJvUH2YcYxUBunkkexm
 elwoCeHTsQzDGfBWfukCIvx+ViB43L/ZC0IHatEMxpuLF1OK1qqQT/X1lJOdGBrpMVXQ
 A2tAcestFUh+rAh3ZIDTtoZQxJgITezG9Uj6SC9TFF7jkZQqUkkq1HAEMEb7L9aSLfGR
 2+EEW9jwsRED8mU5OwXQT30sTj3SOdETC0gHHKMnbub19fDL7qRbHJRGStGor4ldXtwI
 0XdA==
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:in-reply-to:references
 :user-agent:date:message-id:mime-version;
 bh=FyVdNXjH+IFW6AjTnaVP7nuT0I3g6b4rFTMUIs0Feuk=;
 b=KJ22pzKS/SWqR7qh4g6lF36Wz3XzF+p3BgWUzQqRpq6y8uEzDKFWR6kVPzaTbVxUhB
 zmhH67x0Mqf70ZKGd9zuGzyFvV83PbnqL+OSlpMK4OKkVAumIpkjCXAs5FvCaJRgleZH
 mL3N1gJmkXr4XU4K5TQsK0CM+20VPiCga4USKjZiaPNywSOSon+avPcCYQjWRmYABbKC
 hk7hxUjIxAzEa7NdbHp4PsyWq7rdfrPL/NrfnAvixRD1oYzYPLzSnQ3qNbwrOqCmQBBX
 PZGXYCfMievdb8FIF5pZlbplk+s2c9qJGg1mfU8de9/fJ1/ZjCqXkD/OCfJ/sNoDVQsE
 NH9w==
X-Gm-Message-State: AOAM530WnKDLoAvYetBJm32SVrB4xsNxEGRvo7PhuxzGX9qOSxwJAvLo
 kOdlWSvVWsUCRYtEmhbai0jZzBiAfbUaoQ==
X-Google-Smtp-Source: ABdhPJyHEagP8xig8EhTL6lJULtEfwKNZURes9zgyZiveRJu9BI7FY+hOdCvikGtqd4tepTEOWw3SQ==
X-Received: by 2002:a17:902:eb8d:b0:161:db34:61f8 with SMTP id
 q13-20020a170902eb8d00b00161db3461f8mr24040576plg.91.1653367359190; 
 Mon, 23 May 2022 21:42:39 -0700 (PDT)
Received: from fedora ([2601:601:9d82:820::e44b])
 by smtp.gmail.com with ESMTPSA id
 w10-20020a62c70a000000b0050dc7628180sm8400140pfg.90.2022.05.23.21.42.37
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 23 May 2022 21:42:37 -0700 (PDT)
From: Chris Marusich <cmmarusich@HIDDEN>
In-Reply-To: <878rudzsmv.fsf@HIDDEN> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 14 Feb 2022 10:47:52 +0100")
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>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Date: Mon, 23 May 2022 21:42:36 -0700
Message-ID: <87sfozzglf.fsf_-_@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: -0.0 (/)
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: multipart/mixed; boundary="=-=-="

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

Hi Ludo,

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

> So you confirm that a single =E2=80=9Cecho=E2=80=9D is not enough, right?

I didn't test one specifically. It might work with just one, but it did
work with three.  If we want to proceed with the "echo" approach, let me
know and I'll test just one echo to see if that is reliable enough.

> 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 see.  Yes, I'll do that if we decide to go with the echo-based
approach.

> 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?

I recall that I tried removing PS1, and I still had trouble.  I believe
it was because even if we unset PS1 as the very first command we do, the
original prompt is still printed.  Foreign distros usually set PS1 to
something, and whatever that is will be printed before we have a chance
to input any commands.  It's hard to avoid that in general.

> Thoughts?

One alternative method I tried successfully in a variety of shells was
to use shell redirection (see attached).  I like this approach.
However, this will only work in shells that support redirection.  I
recall testing with bash, ash (busybox's shell), dash, zsh, fish, ksh,
and csh.  I recall that only csh failed, since it doesn't support
redirection.

I personally like the attached patch better than what I proposed
earlier.  The earlier patch just echoes a few times.  Presumably, it
only works because the PS1 prompt is likely (but not guaranteed) to be
emitted before the last of the echo commands finishes printing.  I'd
rather just control the desired output and ignore PS1 entirely, and that
is what the attached patch accomplishes using FDs.  However, if support
for shells without redirection is a requirement, then maybe the original
hack (echo a few times) is OK, or perhaps we need something else.

How would you like to proceed?  Is it OK to rely on shell redirection?

=2D-=20
Chris

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

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-environment-Prevent-PS1-from-clobbering-output-in-ch.patch
Content-Transfer-Encoding: quoted-printable
Content-Description: [PATCH] environment: Prevent PS1 from clobbering output in 'check'.

From=209a1cef589abf01b61e22656f44c76441f4c50ffd Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@HIDDEN>
Date: Fri, 11 Mar 2022 00:20:12 -0800
Subject: [PATCH] environment: Prevent PS1 from clobbering output in 'check'.

Fixes: <https://issues.guix.gnu.org/51466>.

* guix/scripts/environment.scm (child-shell-environment) [shell-pipe]
[shell-pipe-in, shell-pipe-out]: New local variables.
[script]: Redirect the stdout of each command to the file descriptor of the
shell-pipe-out port.
[lines]: In the child, close shell-pipe-in before starting the shell.  In t=
he
parent, close shell-pipe-out before sending the script to the shell.  Read
lines from shell-pipe-in, not port, so that the shell's PS1 prompt cannot
clobber the lines.  Close shell-pipe-in just before waiting on the child.
=2D--
 guix/scripts/environment.scm | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 3216235937..f0cb341aab 100644
=2D-- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -48,6 +48,7 @@ (define-module (guix scripts environment)
   #:autoload   (gnu packages bash) (bash)
   #:autoload   (gnu packages bootstrap) (bootstrap-executable %bootstrap-g=
uile)
   #:use-module (ice-9 match)
+  #:use-module (ice-9 format)
   #:autoload   (ice-9 rdelim) (read-line)
   #:use-module (ice-9 vlist)
   #:use-module (srfi srfi-1)
@@ -418,11 +419,23 @@ (define (child-shell-environment shell profile manife=
st)
   (define-values (controller inferior)
     (openpty))
=20
+  (define shell-pipe (pipe))
+  (define shell-pipe-in (car shell-pipe))
+  (define shell-pipe-out (cdr shell-pipe))
+
   (define script
=2D    ;; Script to obtain the list of environment variable values.  On a P=
OSIX
=2D    ;; shell we can rely on 'set', but on fish we have to use 'env' (fis=
h's
=2D    ;; 'set' truncates values and prints them in a different format.)
=2D    "env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\n")
+    ;; Script to obtain the list of environment variable values.
+    ;;
+    ;; On a POSIX shell we can rely on 'set', but on fish we have to use '=
env'
+    ;; (fish's 'set' truncates values and prints them in a different forma=
t).
+    ;;
+    ;; Unless we redirect output to a dedicated file descriptor, there is a
+    ;; risk that the shell's PS1 prompt might clobber the output.  See:
+    ;; https://issues.guix.gnu.org/53355
+    (let ((out-fd (port->fdes shell-pipe-out)))
+      (format
+       #f "env 1>&~d || /usr/bin/env 1>&~d || set 1>&~d; \
+echo GUIX-CHECK-DONE 1>&~d; read x; exit\n" out-fd out-fd out-fd out-fd)))
=20
   (define lines
     (match (primitive-fork)
@@ -432,17 +445,22 @@ (define lines
            (load-profile profile manifest #:pure? #t)
            (setenv "GUIX_ENVIRONMENT" profile)
            (close-fdes controller)
+           (close-port shell-pipe-in)
            (login-tty inferior)
            (execl shell shell))
          (lambda _
            (primitive-exit 127))))
       (pid
        (close-fdes inferior)
+       (close-port shell-pipe-out)
        (let* ((port   (fdopen controller "r+l"))
               (result (begin
                         (display script port)
                         (let loop ((lines '()))
=2D                          (match (read-line port)
+                          ;; Read from our special port, not from the
+                          ;; controller port, to prevent the shell's PS1
+                          ;; prompt from getting mixed into what we read.
+                          (match (read-line shell-pipe-in)
                             ((? eof-object?) (reverse lines))
                             ("GUIX-CHECK-DONE\r"
                              (display "done\n" port)
@@ -452,6 +470,7 @@ (define lines
                              (loop (cons (string-drop-right line 1)
                                          lines))))))))
          (close-port port)
+         (close-port shell-pipe-in)
          (waitpid pid)
          result))))
=20

base-commit: adf5ae5a412ed13302186dd4ce8e2df783d4515d
=2D-=20
2.34.0


--=-=-=--

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

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

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmKMYjwVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadGUoQAJXWVsqVTXddDRXcOeqM0f0YX3/Y
3JXnXJF+H+uGDU/X7ol+5f/Alq1gH9zbSP4SExwPYHPt5v/kg3RPQB2sWlg7xmrX
pHlh00XhLbZASgAXFtbIzNRAxDtcTKkE5U2dBHj9fFmY30PMfd8nItkkFW2JxYsf
61bHUO9J3kx4z5Ud6MEntqBqa9l1tw4UCmOAW8s7MNQvcyL2N5DIFLnSvG0wiSTZ
jvoPoUX5MGX/ByRGvRtsWObIp9790gmS9ERd/aBYsw7n82bgSTTkj+S9ryJUmFGA
lOodZ1l6ydYisKvDutVhuCNsIzsu88NC9pf3vEnweLtg/Se7V9oRat+e1lOfYImU
kVRKVKkk1XGeePCR1U2FMH3YypiGx3gCoULjBI6Sxk+Eo+MbAHTZKZnHBC1Bxx0j
fGoxM5QYoDZJaIll2uwoWUyJjCVifETFSXETxZeXGrrXPQmqQnd5CRaK7cB//9TC
MWH933SZDanOkUe/bfIjt/I+FtwBJQatlIEJJuskh5B1UqFQ1EN6olG69PAb84IA
BcWKZ14sd/5KChhfdRhCOhW6qFAQe2pfijpRV3kD9dMIWRV2InSbiHymlKfX+W3V
KnH1bKQdT9FPEz0KQCX68HXYa06F0a4Fm5oomZD6h4UJH/csbn7EIDlDxBbzLwia
59Y6quGxi8sRtL7v
=1Fcq
-----END PGP SIGNATURE-----
--==-=-=--




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 13 Jun 2022 10:04:01 +0000
Resent-Message-ID: <handler.51466.B51466.165511462125755 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165511462125755
          (code B ref 51466); Mon, 13 Jun 2022 10:04:01 +0000
Received: (at 51466) by debbugs.gnu.org; 13 Jun 2022 10:03:41 +0000
Received: from localhost ([127.0.0.1]:57289 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o0gv7-0006hK-9y
	for submit <at> debbugs.gnu.org; Mon, 13 Jun 2022 06:03:41 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35070)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1o0gv5-0006h4-L3; Mon, 13 Jun 2022 06:03:39 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:35268)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o0gux-0003v6-F5; Mon, 13 Jun 2022 06:03:33 -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=vE2DPGZjISDz4OeDBBbBDP3Gt469bhSaSXE2M/77P8o=; b=RCLSRNwhXmbiTuRkmGCf
 iEjHQE5tGotMmU4qmrAVwyddBN8pIqor2S4hLWZhWabzTRXwqmdEgYkamWjAyFz0XscYABRGkRWDC
 bVRQHO9+jARAdJz/GCBvKANHFJKWY0By52OQC/eg693aAKzCTIpuHgMWIRrZRZ5L0h2905RyNwZ1O
 k2P/oucnXCVKPUyerBjkHvY4yOcdeX00X4pjDWJWNb4sTzkIWqVQlPwQJFar0OCG2pjUERPkm3swS
 BTsKG9PCShd851jgFFwF6TGXX4rN+7Ldmlf1wDAznGzvAnnFFh4C/tcd8Hs9w6XwZmMeHxGPldlFm
 GdpCEuCztmTYCg==;
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=53436 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 1o0guw-0004Ba-SJ; Mon, 13 Jun 2022 06:03:31 -0400
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Quintidi 25 Prairial an 230 de la =?UTF-8?Q?R=C3=A9volution,?= jour de la Tanche
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: Mon, 13 Jun 2022 12:03:28 +0200
In-Reply-To: <87sfozzglf.fsf_-_@HIDDEN> (Chris Marusich's message of "Mon, 
 23 May 2022 21:42:36 -0700")
Message-ID: <871qvsubgv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
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,

Chris Marusich <cmmarusich@HIDDEN> skribis:

> One alternative method I tried successfully in a variety of shells was
> to use shell redirection (see attached).  I like this approach.
> However, this will only work in shells that support redirection.  I
> recall testing with bash, ash (busybox's shell), dash, zsh, fish, ksh,
> and csh.  I recall that only csh failed, since it doesn't support
> redirection.

That=E2=80=99s a good success list in my view; not being a POSIX shell, (t)=
csh
was already excluded from the list in the original submission I think:
<https://issues.guix.gnu.org/51285>.

> I personally like the attached patch better than what I proposed
> earlier.  The earlier patch just echoes a few times.  Presumably, it
> only works because the PS1 prompt is likely (but not guaranteed) to be
> emitted before the last of the echo commands finishes printing.  I'd
> rather just control the desired output and ignore PS1 entirely, and that
> is what the attached patch accomplishes using FDs.  However, if support
> for shells without redirection is a requirement, then maybe the original
> hack (echo a few times) is OK, or perhaps we need something else.
>
> How would you like to proceed?  Is it OK to rely on shell redirection?

Yeah, I think so.  This new approach looks more robust.

> From 9a1cef589abf01b61e22656f44c76441f4c50ffd Mon Sep 17 00:00:00 2001
> From: Chris Marusich <cmmarusich@HIDDEN>
> Date: Fri, 11 Mar 2022 00:20:12 -0800
> Subject: [PATCH] environment: Prevent PS1 from clobbering output in 'chec=
k'.
>
> Fixes: <https://issues.guix.gnu.org/51466>.
>
> * guix/scripts/environment.scm (child-shell-environment) [shell-pipe]
> [shell-pipe-in, shell-pipe-out]: New local variables.
> [script]: Redirect the stdout of each command to the file descriptor of t=
he
> shell-pipe-out port.
> [lines]: In the child, close shell-pipe-in before starting the shell.  In=
 the
> parent, close shell-pipe-out before sending the script to the shell.  Read
> lines from shell-pipe-in, not port, so that the shell's PS1 prompt cannot
> clobber the lines.  Close shell-pipe-in just before waiting on the child.

LGTM, please push!

Ludo=E2=80=99.




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Chris Marusich <cmmarusich@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sun, 19 Jun 2022 20:42:02 +0000
Resent-Message-ID: <handler.51466.B51466.16556712643935 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.16556712643935
          (code B ref 51466); Sun, 19 Jun 2022 20:42:02 +0000
Received: (at 51466) by debbugs.gnu.org; 19 Jun 2022 20:41:04 +0000
Received: from localhost ([127.0.0.1]:53292 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o31jD-00011O-TU
	for submit <at> debbugs.gnu.org; Sun, 19 Jun 2022 16:41:04 -0400
Received: from mail-pj1-f53.google.com ([209.85.216.53]:45852)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cmmarusich@HIDDEN>)
 id 1o31jC-00010N-UC; Sun, 19 Jun 2022 16:41:03 -0400
Received: by mail-pj1-f53.google.com with SMTP id
 t3-20020a17090a510300b001ea87ef9a3dso8462834pjh.4; 
 Sun, 19 Jun 2022 13:41:02 -0700 (PDT)
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=1FmFGA4oAMyTjtZLdLSKGtGhb1FiM10alkocvBJMFrU=;
 b=D+50OsczFpLqqcuevdsBK0GueC07mr36hWNDgyKqxKhSwaULoTJaov/CW4fbyxzQKb
 +bPQR8xAuOnekGyTQ6cPkrsl9q/Bn20iPzesTsUt6s5Dl4aSo9RhyrsIrMatW+sqI0Jh
 jjHt3f7oxwYFz3Ths7IGo7oygbNEDVX12edpXtWB4bHRbU1CdSAr6nqViIvbYcod/Pjf
 9KtPb2GCBADO7sGcBLxH4691AzhMQfaGvnGE9XbU2NiN3nwec9lWOh6U4jmYYE+nOkzo
 dLnQaL3Prk1JDQqefLiXgRGFJ/hYHCuUMiXVAI6f9HopLl/r++twYidFViKX/GEoSf1T
 FQEg==
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=1FmFGA4oAMyTjtZLdLSKGtGhb1FiM10alkocvBJMFrU=;
 b=iUp48v0Tiu59NJWeryhX30xS15pMrWKQGGqFWHJvqqjrrMwf9nekJwtPY9+x78B8SO
 4iN0ivn6WT4pQhtydXXom8ZqDJOaj6Y5RKZS9GXJ3AFNLNZQPyQhm3SUrs2QZFPCQsXm
 i/wrqvL1TB2J53sUrIcTz82mtlZGDbfYdtn0DrUHPn9IIvNcxtzCd+UBbTCnMdKDbPxt
 RavmV3bVvX2x69DSk7iFRNvXeBzIhAR0vF38ytFQT31lvN3myUH5cL7DNWl53bEVyIhi
 TNLC5FkBCujbVV5mItMRCGiKo8RkPUxm9QBDWbjRCn15t6Pn5Pf+NpHSHdCCd7F9gF1w
 T96w==
X-Gm-Message-State: AJIora+SutH+s/GFTdjLCCUInePJFPyMqP29G3BQe585+Cs6uusYKFti
 ba+U/boTjc/yEGYYayXky2Yd25g8gEA=
X-Google-Smtp-Source: AGRyM1vBke6apiexPMN0L2U8j5js1C2Z14Yx/lMKs7k1TbU/yNefETE3iuOBLDVyo2wYx076T9GAKg==
X-Received: by 2002:a17:902:cec2:b0:166:4e45:e1b2 with SMTP id
 d2-20020a170902cec200b001664e45e1b2mr20576692plg.73.1655671256404; 
 Sun, 19 Jun 2022 13:40:56 -0700 (PDT)
Received: from fedora (c-71-231-157-28.hsd1.wa.comcast.net. [71.231.157.28])
 by smtp.gmail.com with ESMTPSA id
 iy20-20020a170903131400b0016a04b577f1sm5058913plb.246.2022.06.19.13.40.54
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 19 Jun 2022 13:40:55 -0700 (PDT)
From: Chris Marusich <cmmarusich@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <871qvsubgv.fsf@HIDDEN>
Date: Sun, 19 Jun 2022 13:40:50 -0700
In-Reply-To: <871qvsubgv.fsf@HIDDEN> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 13 Jun 2022 12:03:28 +0200")
Message-ID: <87k09cpest.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-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: multipart/mixed; boundary="=-=-="

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

Hi Ludo,

Thank you for the review!

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

> LGTM, please push!

Before pushing, I did some more tests to make sure it was still working.
When I did this, I noticed that read-line was no longer returning
strings that end in "\r".  This prevents child-shell-environment from
behaving correctly, since it incorrectly assumes that all the lines end
in "\r", stripping it off unconditionally.  In the past, I'm sure
read-line was returning strings that end in "\r".  I don't know what
changed, but I've attached a second patch that fixes this issue, also.

Unless you have more feedback, I'll go ahead and push both patches to
master in a few days.

=2D-=20
Chris

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

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-environment-Don-t-assume-that-lines-have-a-trailing-.patch
Content-Transfer-Encoding: quoted-printable

From=20c4fee9e63f8cb694de86ae46bd1e2e4c692eb6f6 Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@HIDDEN>
Date: Sun, 19 Jun 2022 13:16:04 -0700
Subject: [PATCH] environment: Don't assume that lines have a trailing "\r".

I've noticed that the child-shell-environment procedure is misbehaving on my
computer because the lines returned by read-line do not have a trailing "\r=
".
In the past, I recall that such lines did in fact have a trailing "\r".  I'm
not sure why it changed, but it seems prudent to just rewrite this code to
tolerate both cases, since it seems that both cases can happen.

* guix/scripts/environment.scm (child-shell-environment) [lines]: Instead of
checking if the line exactly matches "GUIX_CHECK_DONE\r"; check if the line
begins with "GUIX_CHECK_DONE".  Instead of always stripping the trailing
character from the line, only do it if the line has a trailing "\r".
=2D--
 guix/scripts/environment.scm | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index f0cb341aab..1fb4f5b7c6 100644
=2D-- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -462,13 +462,18 @@ (define lines
                           ;; prompt from getting mixed into what we read.
                           (match (read-line shell-pipe-in)
                             ((? eof-object?) (reverse lines))
=2D                            ("GUIX-CHECK-DONE\r"
+                            ((? (lambda (line)
+                                  ;; The line might or might not have a tr=
ailing \r.
+                                  (string-prefix? "GUIX-CHECK-DONE" line)))
                              (display "done\n" port)
                              (reverse lines))
                             (line
=2D                             ;; Drop the '\r' from LINE.
=2D                             (loop (cons (string-drop-right line 1)
=2D                                         lines))))))))
+                             ;; Strip the trailing '\r' from LINE if prese=
nt.
+                             (let ((stripped-line
+                                    (if (string-suffix? "\r" line)
+                                        (string-drop-right line 1)
+                                        line)))
+                               (loop (cons stripped-line lines)))))))))
          (close-port port)
          (close-port shell-pipe-in)
          (waitpid pid)
=2D-=20
2.34.0


--=-=-=--

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

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

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmKvidMVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadCbEP/ixl02qd6fKeuKSLzJq+FDSMRNqs
sn4EYxszto77JYFsnHwdIAfMK9kDrZxHqfY9IBLlKS6eUymNFGJs2o64FqezqLOj
bWcneKhUr72BwAzzhstiToRv3CuILB0gyLtTuFWFk/B5+n1zCuNicZ4XKnULChA1
13IyWv/xXZNi2kpa9JVk+Q4y8DHs24O7SsN0C5lKKC7On7aOXaoMd+jE89q84Ick
kzqqXogu04WsxmNhXrgWBq3ByvJjAaL9k8ReoB0rIO3kGj+yNn9shItCti9cGqDb
0pqaedQaidBztol6LIgf3HdZ8sqwhU7bg0ibkpWqXJZte11veFutgXZi/x0kHPo5
/5NmfyPW1ErWBloaUCz6VNZfpPokDbjKtinLntIe+DvNmxqwa3niWZLbWYTbVqO0
dIM4CU5B17cpjhXZR5ApSJv+TpvET7HqmT7EV0dOwsq5YgNliB2ZxM3i2EQC6ZxQ
ASMj1A+gL0vg3ZSgzkad+EwZXHMw5ksPYdWzqyvpNlfXd4PaOVHxxHnlpXnimhh3
BPZdbcf41P6UV2q7sTQBsLKsj7sNkJN1yCnk0kSIZUuWw5bn4WFRNs5dJmIjKeo9
bQe3EVLISSl1rOB+Fj6VF1dcv8VtNqmEGOyjNvz5BcufhV+JPsw3PPaQYgXxZx1d
p7QRW97iTH6UmKBm
=Ni0q
-----END PGP SIGNATURE-----
--==-=-=--




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 20 Jun 2022 07:35:02 +0000
Resent-Message-ID: <handler.51466.B51466.165571048312551 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165571048312551
          (code B ref 51466); Mon, 20 Jun 2022 07:35:02 +0000
Received: (at 51466) by debbugs.gnu.org; 20 Jun 2022 07:34:43 +0000
Received: from localhost ([127.0.0.1]:53982 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o3Bvn-0003GM-1W
	for submit <at> debbugs.gnu.org; Mon, 20 Jun 2022 03:34:43 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42274)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1o3Bvl-0003G7-PI; Mon, 20 Jun 2022 03:34:42 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43482)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o3Bvg-0003As-Di; Mon, 20 Jun 2022 03:34:36 -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=E9MAD8S9F+JymPrHMEVf9Fzg+lmwzOKAJ/ejwryrBck=; b=WWBDwakikhD0LAhiv3s+
 6TsGyY//iK1//i80grAtYIWf02o0NQchcvR2eXUkxpoVNKnQxODjfpPnYwpHFreb5FeG3Fw06d0Fr
 ATUtZfHdz5Lawh70eppgTBD3R+4vY9CIcyaxHC63XiQ90MXLbOc/HUlZCx0W3X0fIrKgn5nsAywNU
 s4En8c7VySO2Gqkn5evDIts7r5lysfO4R6HOcWdPIEg4v5H+T10n0Oizh26cjcpTvOcz+xeGJNzDk
 d7gxx2Yagvh+8a7ZPjQNtIWqeFoHG++RP+f9HqyuRmpdj78SPtfsjQeI8A7AJ/0p2JApmmJDPzrkG
 S0bKFCUE8vDr2w==;
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=55018 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 1o3Bvf-0002pw-8O; Mon, 20 Jun 2022 03:34:36 -0400
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <871qvsubgv.fsf@HIDDEN>
 <87k09cpest.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Duodi 2 Messidor an 230 de la =?UTF-8?Q?R=C3=A9volution,?= jour de l'Avoine
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: Mon, 20 Jun 2022 09:34:33 +0200
In-Reply-To: <87k09cpest.fsf@HIDDEN> (Chris Marusich's message of "Sun, 19
 Jun 2022 13:40:50 -0700")
Message-ID: <874k0fbxfa.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
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 Marusich <cmmarusich@HIDDEN> skribis:

> Before pushing, I did some more tests to make sure it was still working.
> When I did this, I noticed that read-line was no longer returning
> strings that end in "\r".  This prevents child-shell-environment from
> behaving correctly, since it incorrectly assumes that all the lines end
> in "\r", stripping it off unconditionally.  In the past, I'm sure
> read-line was returning strings that end in "\r".  I don't know what
> changed, but I've attached a second patch that fixes this issue, also.

Weird, not sure what could have changed.

> Unless you have more feedback, I'll go ahead and push both patches to
> master in a few days.

Great, thank you!

Ludo=E2=80=99.




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: bokr@HIDDEN
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 20 Jun 2022 10:13:01 +0000
Resent-Message-ID: <handler.51466.B51466.165571995813711 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165571995813711
          (code B ref 51466); Mon, 20 Jun 2022 10:13:01 +0000
Received: (at 51466) by debbugs.gnu.org; 20 Jun 2022 10:12:38 +0000
Received: from localhost ([127.0.0.1]:54434 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o3EOb-0003Z4-Vj
	for submit <at> debbugs.gnu.org; Mon, 20 Jun 2022 06:12:38 -0400
Received: from mailout.easymail.ca ([64.68.200.34]:44460)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bokr@HIDDEN>)
 id 1o3EOY-0003Yj-Ek; Mon, 20 Jun 2022 06:12:36 -0400
Received: from localhost (localhost [127.0.0.1])
 by mailout.easymail.ca (Postfix) with ESMTP id B798461D76;
 Mon, 20 Jun 2022 10:12:28 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1655719948; bh=2sveoYcOrAXCbu66Lcz+YQA+rm7eOZZ8Y+bZIah7Ink=;
 h=From:Date:To:Cc:Subject:References:In-Reply-To:From;
 b=RAIxWx15cUc5Cl3qTm+pncCSa2S5+kS/zZvoVBZ7xBrK1dsSLCBR8OpNqEyNxrgXU
 XCdc2lK9Lxte4LaOSJ/dtZmraJ/k0wDfzJSlxS4rK3xsnW2KmpBGhl2F83xt9156CH
 J/bzczT0YNoV/ixlNP1waoq1EUxh/az2Ix+gg2iYt4Dm0IJsSxd7fRtKGm8AwD9XGp
 /ePMGoBMO/UlCg9wwf5XKPVxblk6Y7JTYAZIrONfbsyylTjjK2K4qGvGkb+pSLZouO
 oy0XvTCB6B+QoEhx+GkpA0lJnScp/VQuOuE9tapwSWE3RVYeeyaq7+ta/xCQKDC0Yv
 cvsyTNS0p3S4w==
X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn
Received: from mailout.easymail.ca ([127.0.0.1])
 by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id yuE3T0keRJ6A; Mon, 20 Jun 2022 10:12:28 +0000 (UTC)
Received: from localhost (m90-129-192-219.cust.tele2.se [90.129.192.219])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
 SHA256) (No client certificate requested)
 by mailout.easymail.ca (Postfix) with ESMTPSA id D5E6D61C94;
 Mon, 20 Jun 2022 10:12:27 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1655719948; bh=2sveoYcOrAXCbu66Lcz+YQA+rm7eOZZ8Y+bZIah7Ink=;
 h=From:Date:To:Cc:Subject:References:In-Reply-To:From;
 b=RAIxWx15cUc5Cl3qTm+pncCSa2S5+kS/zZvoVBZ7xBrK1dsSLCBR8OpNqEyNxrgXU
 XCdc2lK9Lxte4LaOSJ/dtZmraJ/k0wDfzJSlxS4rK3xsnW2KmpBGhl2F83xt9156CH
 J/bzczT0YNoV/ixlNP1waoq1EUxh/az2Ix+gg2iYt4Dm0IJsSxd7fRtKGm8AwD9XGp
 /ePMGoBMO/UlCg9wwf5XKPVxblk6Y7JTYAZIrONfbsyylTjjK2K4qGvGkb+pSLZouO
 oy0XvTCB6B+QoEhx+GkpA0lJnScp/VQuOuE9tapwSWE3RVYeeyaq7+ta/xCQKDC0Yv
 cvsyTNS0p3S4w==
From: bokr@HIDDEN
Date: Mon, 20 Jun 2022 12:12:10 +0200
Message-ID: <20220620101210.GA19777@LionPure>
References: <87lez5td4n.fsf@HIDDEN> <87sftc4osu.fsf@HIDDEN>
 <87h79slysd.fsf@HIDDEN> <87sft13dyv.fsf@HIDDEN>
 <874k59d802.fsf@HIDDEN> <87wnhy2w73.fsf_-_@HIDDEN>
 <878rudzsmv.fsf@HIDDEN> <87sfozzglf.fsf_-_@HIDDEN>
 <871qvsubgv.fsf@HIDDEN> <87k09cpest.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87k09cpest.fsf@HIDDEN>
https: //lwn.net/Articles/892755/https://lwn.net/Articles/892755/ttps://lwn.net/Articles/892755/
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Spam-Score: -2.3 (--)
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 observe this behaviour inside a git repo directory?
I wonder if this git security thing could be relevant:
    https://lwn.net/Articles/892755/
It makes also me wonder about readline completion stuff
possibly interacting. Isn't that implemented with readline?

I have had some mystery bash parsing errors, and I noticed
    set|less
shows a heck of a lot of functions defined that I don't
remember seeing in the past. 
Anyway, shouldn't stuff like that have better hygiene than just prefixed
_underscore ? Or maybe set|less doesn't show all that on your system?

Disclaimer: I played a lot of games trying to make stuff conditional
at login, where I  renamed .bash_profile and .bashrc (e.g. .my_bashrc)
which brought .profile into play, and I messed with the downstream
of that to source some .my_'s conditionally, so I've go a fragile mess right now ;/

Anyway, did you determine why things changed in the first place?
Or will this be a whack-a-mole game with future weirdnesses? :)

Semms like IWBN to have interfaces governed by contracts :)

Best,
Bengt Richter

On +2022-06-19 13:40:50 -0700, Chris Marusich wrote:
> Hi Ludo,
> 
> Thank you for the review!
> 
> Ludovic Courtès <ludo@HIDDEN> writes:
> 
> > LGTM, please push!
> 
> Before pushing, I did some more tests to make sure it was still working.
> When I did this, I noticed that read-line was no longer returning
> strings that end in "\r".  This prevents child-shell-environment from
> behaving correctly, since it incorrectly assumes that all the lines end
> in "\r", stripping it off unconditionally.  In the past, I'm sure
> read-line was returning strings that end in "\r".  I don't know what
> changed, but I've attached a second patch that fixes this issue, also.
> 
> Unless you have more feedback, I'll go ahead and push both patches to
> master in a few days.
> 
> -- 
> Chris
> 
> PGP: https://savannah.gnu.org/people/viewgpg.php?user_id=106836

> From c4fee9e63f8cb694de86ae46bd1e2e4c692eb6f6 Mon Sep 17 00:00:00 2001
> From: Chris Marusich <cmmarusich@HIDDEN>
> Date: Sun, 19 Jun 2022 13:16:04 -0700
> Subject: [PATCH] environment: Don't assume that lines have a trailing "\r".
> 
> I've noticed that the child-shell-environment procedure is misbehaving on my
> computer because the lines returned by read-line do not have a trailing "\r".
> In the past, I recall that such lines did in fact have a trailing "\r".  I'm
> not sure why it changed, but it seems prudent to just rewrite this code to
> tolerate both cases, since it seems that both cases can happen.
> 
> * guix/scripts/environment.scm (child-shell-environment) [lines]: Instead of
> checking if the line exactly matches "GUIX_CHECK_DONE\r"; check if the line
> begins with "GUIX_CHECK_DONE".  Instead of always stripping the trailing
> character from the line, only do it if the line has a trailing "\r".
> ---
>  guix/scripts/environment.scm | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
> index f0cb341aab..1fb4f5b7c6 100644
> --- a/guix/scripts/environment.scm
> +++ b/guix/scripts/environment.scm
> @@ -462,13 +462,18 @@ (define lines
>                            ;; prompt from getting mixed into what we read.
>                            (match (read-line shell-pipe-in)
>                              ((? eof-object?) (reverse lines))
> -                            ("GUIX-CHECK-DONE\r"
> +                            ((? (lambda (line)
> +                                  ;; The line might or might not have a trailing \r.
> +                                  (string-prefix? "GUIX-CHECK-DONE" line)))
>                               (display "done\n" port)
>                               (reverse lines))
>                              (line
> -                             ;; Drop the '\r' from LINE.
> -                             (loop (cons (string-drop-right line 1)
> -                                         lines))))))))
> +                             ;; Strip the trailing '\r' from LINE if present.
> +                             (let ((stripped-line
> +                                    (if (string-suffix? "\r" line)
> +                                        (string-drop-right line 1)
> +                                        line)))
> +                               (loop (cons stripped-line lines)))))))))
>           (close-port port)
>           (close-port shell-pipe-in)
>           (waitpid pid)
> -- 
> 2.34.0
> 







Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Bengt Richter <bokr@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 20 Jun 2022 17:58:01 +0000
Resent-Message-ID: <handler.51466.B51466.16557478468092 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.16557478468092
          (code B ref 51466); Mon, 20 Jun 2022 17:58:01 +0000
Received: (at 51466) by debbugs.gnu.org; 20 Jun 2022 17:57:26 +0000
Received: from localhost ([127.0.0.1]:58394 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o3LeQ-00026R-Ej
	for submit <at> debbugs.gnu.org; Mon, 20 Jun 2022 13:57:26 -0400
Received: from mailout.easymail.ca ([64.68.200.34]:45366)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bokr@HIDDEN>)
 id 1o3LeO-00026C-6w; Mon, 20 Jun 2022 13:57:24 -0400
Received: from localhost (localhost [127.0.0.1])
 by mailout.easymail.ca (Postfix) with ESMTP id CA0D361FC1;
 Mon, 20 Jun 2022 17:57:18 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1655747838; bh=JIjYE/kcxXFZZbotlIywVuaOcYg/NQnYMrmZvGK45dw=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=NQwtDNS3Po5ycxkn6JrLWbs2cnN5DW54O0zoIGHio2ZxwOyMh5JfidImDDK3Noink
 iQuLeCuEvGfia/brVxZT5OPW/q4w2jdnATejBS3Zb4+WG/dwV5BLlBDUTXs3gs70P6
 l3A7STVNuE69HQoYyq3pMOHt+kHgmW/oxJGErXXTmiXkeujO0wJCkbdTU2tGxaim0Y
 VDKUUPL8zWVdpnsfBcXNUB5lBA/Dp/wyvkYOFKEoviNCVFPB3BCdwF92CSlJfnVVvC
 nW8w9Y343Y68wW9zuQJ9HgiR5LIEulssVzQeB1+VLBU1kasFlsynfxP+Ke4DyGDYzs
 CUfK/afcPSYLQ==
X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn
Received: from mailout.easymail.ca ([127.0.0.1])
 by localhost (emo07-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id YPh9IywsAen8; Mon, 20 Jun 2022 17:57:18 +0000 (UTC)
Received: from localhost (m90-129-192-219.cust.tele2.se [90.129.192.219])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
 SHA256) (No client certificate requested)
 by mailout.easymail.ca (Postfix) with ESMTPSA id 006A56174E;
 Mon, 20 Jun 2022 17:57:17 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1655747838; bh=JIjYE/kcxXFZZbotlIywVuaOcYg/NQnYMrmZvGK45dw=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=NQwtDNS3Po5ycxkn6JrLWbs2cnN5DW54O0zoIGHio2ZxwOyMh5JfidImDDK3Noink
 iQuLeCuEvGfia/brVxZT5OPW/q4w2jdnATejBS3Zb4+WG/dwV5BLlBDUTXs3gs70P6
 l3A7STVNuE69HQoYyq3pMOHt+kHgmW/oxJGErXXTmiXkeujO0wJCkbdTU2tGxaim0Y
 VDKUUPL8zWVdpnsfBcXNUB5lBA/Dp/wyvkYOFKEoviNCVFPB3BCdwF92CSlJfnVVvC
 nW8w9Y343Y68wW9zuQJ9HgiR5LIEulssVzQeB1+VLBU1kasFlsynfxP+Ke4DyGDYzs
 CUfK/afcPSYLQ==
Date: Mon, 20 Jun 2022 19:56:56 +0200
From: Bengt Richter <bokr@HIDDEN>
Message-ID: <20220620175656.GA24590@LionPure>
References: <87sftc4osu.fsf@HIDDEN> <87h79slysd.fsf@HIDDEN>
 <87sft13dyv.fsf@HIDDEN> <874k59d802.fsf@HIDDEN>
 <87wnhy2w73.fsf_-_@HIDDEN> <878rudzsmv.fsf@HIDDEN>
 <87sfozzglf.fsf_-_@HIDDEN> <871qvsubgv.fsf@HIDDEN>
 <87k09cpest.fsf@HIDDEN> <20220620101210.GA19777@LionPure>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20220620101210.GA19777@LionPure>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Spam-Score: -2.3 (--)
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 (---)

Sorry to reply to myself, but forgot to illustrate.

On +2022-06-20 12:12:10 +0200, bokr@HIDDEN wrote:
> Hi Chris,
[...]
> 
> I have had some mystery bash parsing errors, and I noticed
>     set|less
> shows a heck of a lot of functions defined that I don't
> remember seeing in the past. 
> Anyway, shouldn't stuff like that have better hygiene than just prefixed
> _underscore ? Or maybe set|less doesn't show all that on your system?
>

There are a couple functions without prefixed underscore too,
which invoke some underscore-prefixed ones that look too trusting
of their arguments if you ask me: can someone declare these safe?

    I think I can grok quote () ...
(escape single quotes and enclose result in single quotes, trusting bash state)
But what if I want to define my own function quote?? How would I know I was
overriding this? I really don't like my programming space occupied by unknowns :-(

--8<---------------cut here---------------start------------->8---
quote () 
{ 
    local quoted=${1//\'/\'\\\'\'};
    printf "'%s'" "$quoted"
}
--8<---------------cut here---------------end--------------->8---

    but this one below will take more time than I want to spend on code
I'm not intentionally going to use, and which invites name clashes
in my command name space :-(

--8<---------------cut here---------------start------------->8---
quote_readline () 
{ 
    local quoted;
    _quote_readline_by_ref "$1" ret;
    printf %s "$ret"
}
--8<---------------cut here---------------end--------------->8---

    where the above calls this:

--8<---------------cut here---------------start------------->8---
_quote_readline_by_ref () 
{ 
    if [ -z "$1" ]; then
        printf -v $2 %s "$1";
    else
        if [[ $1 == \'* ]]; then
            printf -v $2 %s "${1:1}";
        else
            if [[ $1 == ~* ]]; then
                printf -v $2 ~%q "${1:1}";
            else
                printf -v $2 %q "$1";
            fi;
        fi;
    fi;
    [[ ${!2} == \$* ]] && eval $2=${!2}
}
--8<---------------cut here---------------end--------------->8---

HTH somehow.
--
Regards,
Bengt Richter




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Bengt Richter <bokr@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 20 Jun 2022 23:29:01 +0000
Resent-Message-ID: <handler.51466.B51466.16557676956649 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.16557676956649
          (code B ref 51466); Mon, 20 Jun 2022 23:29:01 +0000
Received: (at 51466) by debbugs.gnu.org; 20 Jun 2022 23:28:15 +0000
Received: from localhost ([127.0.0.1]:58608 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o3QoY-0001jB-O7
	for submit <at> debbugs.gnu.org; Mon, 20 Jun 2022 19:28:15 -0400
Received: from mailout.easymail.ca ([64.68.200.34]:55554)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bokr@HIDDEN>)
 id 1o3QoX-0001it-93; Mon, 20 Jun 2022 19:28:14 -0400
Received: from localhost (localhost [127.0.0.1])
 by mailout.easymail.ca (Postfix) with ESMTP id 00FE4E18EC;
 Mon, 20 Jun 2022 23:28:08 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1655767688; bh=y/AVj3jHEaRiHQFmOoPWgD3JO3fvfxlCrHiiK3lAiYE=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=afvzZ2fKsLgk+SNJfaV33UG26+2WTrpCMO+RwIOogWf84gCHDMG9617Zaby22b/tS
 RUUc1KbJck07R3rrEQD7b4iBK5K3fIx1oOCfnyrPZKtqmtmWD7EGCnG/zt/9nSE1qn
 cVyb2fuR9TgK4Qf/n/YuheBoRHnuhIs2u52jyfy5GP9IkBK4ICEMS75EuhTHgqRMSb
 MXS2vwsLvrYHBXNXZDYT7Tsy4L3KdJFwcNhKczWY6Y3GDEdb6/KMUjNq9s9v/theBk
 6L3upC8inVq9Da2Lwujku3GyWWpJECuxhGfWzR3eHSGXo7kUhJ7x2Qo+nVNpfJ9a+L
 9RKl5po2buN0Q==
X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn
Received: from mailout.easymail.ca ([127.0.0.1])
 by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id SfhCD5X62uk3; Mon, 20 Jun 2022 23:28:07 +0000 (UTC)
Received: from localhost (m83-185-37-85.cust.tele2.se [83.185.37.85])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
 SHA256) (No client certificate requested)
 by mailout.easymail.ca (Postfix) with ESMTPSA id 3FD53E18EB;
 Mon, 20 Jun 2022 23:28:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1655767687; bh=y/AVj3jHEaRiHQFmOoPWgD3JO3fvfxlCrHiiK3lAiYE=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=eJO2Q2sHObVZkoDqR3a+OE9gn8hqdeVCNs5rJysRoelVaz6GK81x7cxWxr6c8870M
 ghSUkd07xvOjQtcHzOQoDJvxKUCIlczYfep/BoYEmuTcFdDFPOX3Tl8PSFDvJzd1qi
 SJ+uXOYJgmaFc8Ca50hbzVN7DzCFacqvxbeJwhsz4fChxBIW0mGHl6pRFPDuXALyWL
 5lr/Zr82ACXqu8BemleckZNC7AFvBtRti3/uq/c2xPgvBkiVl3w4MkyqjFuHJWG4gh
 ezfo7C3Ws8yqqRYQFS3w17HqFYCv2tuXGW8Og9p0erLjRTtWdhXgvbjK8YlX5Zuqbu
 q4fZnuw+8Fjww==
Date: Tue, 21 Jun 2022 01:27:49 +0200
From: Bengt Richter <bokr@HIDDEN>
Message-ID: <20220620232749.GA25854@LionPure>
References: <87h79slysd.fsf@HIDDEN> <87sft13dyv.fsf@HIDDEN>
 <874k59d802.fsf@HIDDEN> <87wnhy2w73.fsf_-_@HIDDEN>
 <878rudzsmv.fsf@HIDDEN> <87sfozzglf.fsf_-_@HIDDEN>
 <871qvsubgv.fsf@HIDDEN> <87k09cpest.fsf@HIDDEN>
 <20220620101210.GA19777@LionPure> <20220620175656.GA24590@LionPure>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20220620175656.GA24590@LionPure>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Spam-Score: -2.3 (--)
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 (---)

Sorry again, but I found the source:

tl;dr: These functions are defined in
    /usr/share/bash-completion/bash_completion
which looks awful kludgey to me, (however clever :)

There is a reference to
    http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00155.html
in the header comments for
    _quote_readline_by_ref () 

I also found
    https://askubuntu.com/questions/571544/bash-tab-completion-bash-unexpected-eof-while-looking-for-matching-bash
My bet is there is at least one bug active now.

Completion is really nice when it works, but IMO they certainly
shouldn't use a name like unadorned ``quote'' in their implementation.

And I think it would be prettier in scheme :)
Lots could be prettier if bash could be extended with scheme.

I'm about out of time to chase this, but I expect to bump into it again ;/
HTH.
--
Regards,
Bengt Richter

On +2022-06-20 19:56:56 +0200, Bengt Richter wrote:
> Sorry to reply to myself, but forgot to illustrate.
> 
> On +2022-06-20 12:12:10 +0200, bokr@HIDDEN wrote:
> > Hi Chris,
> [...]
> > 
> > I have had some mystery bash parsing errors, and I noticed
> >     set|less
> > shows a heck of a lot of functions defined that I don't
> > remember seeing in the past. 
> > Anyway, shouldn't stuff like that have better hygiene than just prefixed
> > _underscore ? Or maybe set|less doesn't show all that on your system?
> >
> 
> There are a couple functions without prefixed underscore too,
> which invoke some underscore-prefixed ones that look too trusting
> of their arguments if you ask me: can someone declare these safe?
> 
>     I think I can grok quote () ...
> (escape single quotes and enclose result in single quotes, trusting bash state)
> But what if I want to define my own function quote?? How would I know I was
> overriding this? I really don't like my programming space occupied by unknowns :-(
> 
> --8<---------------cut here---------------start------------->8---
> quote () 
> { 
>     local quoted=${1//\'/\'\\\'\'};
>     printf "'%s'" "$quoted"
> }
> --8<---------------cut here---------------end--------------->8---
> 
>     but this one below will take more time than I want to spend on code
> I'm not intentionally going to use, and which invites name clashes
> in my command name space :-(
> 
> --8<---------------cut here---------------start------------->8---
> quote_readline () 
> { 
>     local quoted;
>     _quote_readline_by_ref "$1" ret;
>     printf %s "$ret"
> }
> --8<---------------cut here---------------end--------------->8---
> 
>     where the above calls this:
> 
> --8<---------------cut here---------------start------------->8---
> _quote_readline_by_ref () 
> { 
>     if [ -z "$1" ]; then
>         printf -v $2 %s "$1";
>     else
>         if [[ $1 == \'* ]]; then
>             printf -v $2 %s "${1:1}";
>         else
>             if [[ $1 == ~* ]]; then
>                 printf -v $2 ~%q "${1:1}";
>             else
>                 printf -v $2 %q "$1";
>             fi;
>         fi;
>     fi;
>     [[ ${!2} == \$* ]] && eval $2=${!2}
> }
> --8<---------------cut here---------------end--------------->8---
> 
> HTH somehow.
> --
> Regards,
> Bengt Richter
> 
> 
> 




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Thiago Jung Bauermann <bauermann@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 21 Jun 2022 04:05:02 +0000
Resent-Message-ID: <handler.51466.B51466.165578428517119 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Bengt Richter <bokr@HIDDEN>
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Chris Marusich <cmmarusich@HIDDEN>, 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165578428517119
          (code B ref 51466); Tue, 21 Jun 2022 04:05:02 +0000
Received: (at 51466) by debbugs.gnu.org; 21 Jun 2022 04:04:45 +0000
Received: from localhost ([127.0.0.1]:58898 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o3V81-0004Ru-NW
	for submit <at> debbugs.gnu.org; Tue, 21 Jun 2022 00:04:45 -0400
Received: from mx.kolabnow.com ([212.103.80.153]:13874)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@HIDDEN>)
 id 1o3V7y-0004RZ-5M; Tue, 21 Jun 2022 00:04:35 -0400
Received: from localhost (unknown [127.0.0.1])
 by mx.kolabnow.com (Postfix) with ESMTP id 2AF5141912;
 Tue, 21 Jun 2022 06:04:28 +0200 (CEST)
Authentication-Results: ext-mx-out003.mykolab.com (amavisd-new);
 dkim=pass (4096-bit key) reason="pass (just generated, assumed good)"
 header.d=kolabnow.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h=
 content-type:content-type:mime-version:message-id:in-reply-to
 :date:date:subject:subject:from:from:references:received
 :received:received; s=dkim20160331; t=1655784267; x=1657598668;
 bh=By/bHHeMCpE7kaJT9Yk/cSOSaT6w1B0de6gLOUSda2E=; b=QyJwXBx72sOP
 ik7oIYXY79VfKhHRqMIcRNNkcGZrWtHrypOcc5R7dAQHT6H64bo9ho4dpyzCv9W9
 +rBCq4P+to+/8Yrj0cUCcBbl5s+scEQJ5ZyhAaDaGnd9jhHjWQcbE+YQqV6beYz9
 N9+I4KpTsb4HNdnpCgrodce5cAdvotKUEquRmlA3eU/qHWvaFavUIwgfFCuzPOZ0
 G0B5Etku1mzcreF0yRYO7K1IuDZwuRL1UXJmFfJdcU3S2ficSf48DNz2ssmqQcyq
 GjqYQ2h8ceG0zBwUfY/wzqsq2zpSbmvfN6G9vaybKD8LiFVAZt4BRb9IWnr+AiV6
 LwN0YfEs4Wn/6bjZ/7SHWdhsoW90gc5g7H3BkSSPv4BS651QI2SO3RqPt9+O4kMR
 tt/8Mu8wc0wirbsDz6UD3keQDxZ2w3vVyO1lxyMM/XpbnO1p/m71Saq6b2kKN/Fn
 hYyaoX5BfKUDlQCxeUbKGTb/jcIT23hQ+SIbQX5XmKI6f/Es5Xg+rnhy6sA2nVjE
 vFusLIan6of1K9c6ZuPbTi3RgQ4F9o5oYW2P/p2AoqexX8PzvufS0l74NDYBeSL0
 oOXBI6LgbKAYG307FfN2D1EwzB/0E24acxT0XPew6VxuudUrofogyxW8oT3G4And
 L3p2KcQbnYNj8aGMRjZHqKHz2kJPBaw=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level: 
X-Spam-Status: No, score=-1.899 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001]
 autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 7ZOmIBDS_dVP; Tue, 21 Jun 2022 06:04:27 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by mx.kolabnow.com (Postfix) with ESMTPS id 12BA54096E;
 Tue, 21 Jun 2022 06:04:26 +0200 (CEST)
Received: from ext-subm002.mykolab.com (unknown [10.9.6.2])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id 26D89DDB;
 Tue, 21 Jun 2022 06:04:26 +0200 (CEST)
References: <87h79slysd.fsf@HIDDEN> <87sft13dyv.fsf@HIDDEN>
 <874k59d802.fsf@HIDDEN> <87wnhy2w73.fsf_-_@HIDDEN>
 <878rudzsmv.fsf@HIDDEN> <87sfozzglf.fsf_-_@HIDDEN>
 <871qvsubgv.fsf@HIDDEN> <87k09cpest.fsf@HIDDEN>
 <20220620101210.GA19777@LionPure> <20220620175656.GA24590@LionPure>
 <20220620232749.GA25854@LionPure>
From: Thiago Jung Bauermann <bauermann@HIDDEN>
Date: Tue, 21 Jun 2022 01:00:48 -0300
In-reply-to: <20220620232749.GA25854@LionPure>
Message-ID: <87y1xq1x2y.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
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 (-)


Hello,

Bengt Richter <bokr@HIDDEN> writes:

> Lots could be prettier if bash could be extended with scheme.

Today is your lucky day. :-)

$ guix show guile-bash | recsel -p name,synopsis
name: guile-bash
synopsis: Extend Bash using Guile  

-- 
Thanks
Thiago




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Chris Marusich <cmmarusich@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sat, 25 Jun 2022 09:09:02 +0000
Resent-Message-ID: <handler.51466.B51466.165614808523367 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165614808523367
          (code B ref 51466); Sat, 25 Jun 2022 09:09:02 +0000
Received: (at 51466) by debbugs.gnu.org; 25 Jun 2022 09:08:05 +0000
Received: from localhost ([127.0.0.1]:44094 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o51ls-00064n-Fe
	for submit <at> debbugs.gnu.org; Sat, 25 Jun 2022 05:08:04 -0400
Received: from mail-pg1-f171.google.com ([209.85.215.171]:44745)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cmmarusich@HIDDEN>)
 id 1o51lq-00064F-My; Sat, 25 Jun 2022 05:08:03 -0400
Received: by mail-pg1-f171.google.com with SMTP id v126so361167pgv.11;
 Sat, 25 Jun 2022 02:08:02 -0700 (PDT)
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=Uz3q1/O8m6/I3PE6ziFsunDstEYer1L1ZB4XvD7HmtY=;
 b=KwRxLKSVEjWeb3I2b5Plq3Pe4Mk05CVBG4MMrQAXeyKyYcmZ+dMaV1py3KOVHMguVu
 ZKphFpv8O5wiKS9L6KmsBnID3Dpo847XaE+IpM7r7Sfe29lVZzc2DAWf5sEMktFTzJxi
 ybkM1jkbOA6Y77xr1bROLbZJ1GtgfyJSZsUrhJqTMQCUDUmJnLSNdIiRzkhPEnHoT/JK
 1sbi0Sl2vc1HW/sS5z0ry91DfnSYJPCej2E2pGwLzha0uHKLiLl5RrPj4LEeJ8SNZCAK
 c8zzv5xFsJSE/bUVxADYmKwaZUgizwjFgzB01hwf28eBRnA+DOzRO+b1K/cIdBG+thq3
 Bdgg==
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=Uz3q1/O8m6/I3PE6ziFsunDstEYer1L1ZB4XvD7HmtY=;
 b=rCvPSD6kF/QBpR4BYaj9lTSkMDR+Qi4T+7fFmpeaqVKOy1O2350Hj86jmdRE7qbBsp
 Y6XG0c8e/3K+6ilIRwp6Mn3+sRnD3UWip6VIBxAJU8vm1LTGDJ+5vb95wUqhZ455YoCv
 HapU8FEPTPjx5YK7qm6qUunHW6e73uHL5MoB+Qri0PJXdTDHSaBpv28bXv6xwsOrPWNK
 c9OnJnkO1vNydtC9lixOwBW74Zcz6u6/lylvvD9IumAWsJdOjmrDWNlMzBmOzQcMggEu
 xbn0WBIiHoOSAOMVgH0nIyS/8x861iKah/Kdh2d5TKdS+QiwQ4UEN3+Vkj1NPqtAn6GX
 SgSQ==
X-Gm-Message-State: AJIora+TIGO97BxhrVUYbN5Ls4QrJd6frudrgsS9V3MlkttVJ2FiBUHr
 utxVgaO/M4O5/6sacLayfAp4cvMRe4M=
X-Google-Smtp-Source: AGRyM1u1xnAanW6Sttnfe/eWfL7izfVlD1SgPZHcvgwOw13nnjDYAPGFcmDlCRekkkZgY8Pp5Bw38Q==
X-Received: by 2002:a63:751b:0:b0:40c:9c39:c890 with SMTP id
 q27-20020a63751b000000b0040c9c39c890mr2859286pgc.302.1656148076321; 
 Sat, 25 Jun 2022 02:07:56 -0700 (PDT)
Received: from fedora ([2601:1c0:c800:53d0::aafd])
 by smtp.gmail.com with ESMTPSA id
 a6-20020a056a000c8600b0051c49fb62b7sm3230768pfv.165.2022.06.25.02.07.54
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 25 Jun 2022 02:07:55 -0700 (PDT)
From: Chris Marusich <cmmarusich@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN>
Date: Sat, 25 Jun 2022 02:07:50 -0700
In-Reply-To: <87sfozzglf.fsf_-_@HIDDEN> (Chris Marusich's message of "Mon, 
 23 May 2022 21:42:36 -0700")
Message-ID: <875ykpdsbd.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-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: multipart/mixed; boundary="=-=-="

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

Hi Ludo & Everyone,

Chris Marusich <cmmarusich@HIDDEN> writes:

> Is it OK to rely on shell redirection?

It turns out that it is probably not OK to rely on shell redirection in
this case, after all.  For example, "dash does not support multi-digit
file descriptors":

https://bugs.launchpad.net/ubuntu/+source/dash/+bug/249620

Indeed, the patch I proposed earlier to rely on shell redirection caused
a command like

./pre-inst-env env SHELL=3D/gnu/store/nm0hccsphymxi8c24xmg6ixm9vcf25xb-dash=
-0.5.11.5/bin/dash guix shell --check --container -D guix

to hang.  It hangs because the FD Guile chooses to create and embed in
the script is 19 (on my machine, at least).  A redirection like
"env >&19" causes dash to error out, so no environment information gets
sent back to the parent process.  The same issue seemed to occur for the
ksh from our oksh package.

To resolve this, I changed the code so that it just writes to a
temporary file.  This is simple and more robust.  With the attached
patch, I was able to use a command like the one above to verify that
"guix environment --check" works correctly for Guix-built bash, dash,
ksh, fish, zsh, and ash.  I also verified that it works for Fedora's
/bin/sh and /bin/bash.

What do you think of this file-based approach?  Supporting many
different shells is pretty tricky, but I think this patch does a good
enough job.

=2D-=20
Chris

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

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-environment-Prevent-PS1-from-clobbering-output-in-ch.patch
Content-Transfer-Encoding: quoted-printable

From=20ef8d12a1d44903eafca7153c9344263b1d5d7d56 Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@HIDDEN>
Date: Fri, 11 Mar 2022 00:20:12 -0800
Subject: [PATCH] environment: Prevent PS1 from clobbering output in 'check'.

Fixes: <https://issues.guix.gnu.org/51466>.

* guix/scripts/environment.scm (child-shell-environment) [temporary-file-po=
rt]
[temporary-file]: New local variables.
[script]: Redirect stdout to the temporary file.
[lines]: In the parent, send the script to the shell, wait for the shell to
exit, and then read lines from the temporary file.  Use a dynamic-wind
expression to ensure we always close port, close temporary-file-port, and
delete temporary-file.
=2D--
 guix/scripts/environment.scm | 63 ++++++++++++++++++++++++------------
 1 file changed, 43 insertions(+), 20 deletions(-)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 3216235937..b02b0771e3 100644
=2D-- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -48,6 +48,7 @@ (define-module (guix scripts environment)
   #:autoload   (gnu packages bash) (bash)
   #:autoload   (gnu packages bootstrap) (bootstrap-executable %bootstrap-g=
uile)
   #:use-module (ice-9 match)
+  #:use-module (ice-9 format)
   #:autoload   (ice-9 rdelim) (read-line)
   #:use-module (ice-9 vlist)
   #:use-module (srfi srfi-1)
@@ -418,14 +419,27 @@ (define (child-shell-environment shell profile manife=
st)
   (define-values (controller inferior)
     (openpty))
=20
+  (define temporary-file-port (mkstemp "/tmp/guix-env.XXXXXX"))
+
+  (define temporary-file (port-filename temporary-file-port))
+
   (define script
=2D    ;; Script to obtain the list of environment variable values.  On a P=
OSIX
=2D    ;; shell we can rely on 'set', but on fish we have to use 'env' (fis=
h's
=2D    ;; 'set' truncates values and prints them in a different format.)
=2D    "env || /usr/bin/env || set; echo GUIX-CHECK-DONE; read x; exit\n")
+    ;; Script to obtain the list of environment variable values.
+    ;;
+    ;; On a POSIX shell we can rely on 'set', but on fish we have to use '=
env'
+    ;; (fish's 'set' truncates values and prints them in a different forma=
t).
+    ;;
+    ;; Unless we redirect output to a file, there is a risk that the shell=
's
+    ;; PS1 prompt might clobber the output.  See:
+    ;; https://issues.guix.gnu.org/53355
+    (format
+     #f "env >~a || /usr/bin/env >~a || set >~a; \
+echo GUIX-CHECK-DONE >>~a; exit\n"
+     temporary-file temporary-file temporary-file temporary-file))
=20
   (define lines
     (match (primitive-fork)
+      ;; Child
       (0
        (catch #t
          (lambda ()
@@ -436,24 +450,33 @@ (define lines
            (execl shell shell))
          (lambda _
            (primitive-exit 127))))
+      ;; Parent
       (pid
        (close-fdes inferior)
=2D       (let* ((port   (fdopen controller "r+l"))
=2D              (result (begin
=2D                        (display script port)
=2D                        (let loop ((lines '()))
=2D                          (match (read-line port)
=2D                            ((? eof-object?) (reverse lines))
=2D                            ("GUIX-CHECK-DONE\r"
=2D                             (display "done\n" port)
=2D                             (reverse lines))
=2D                            (line
=2D                             ;; Drop the '\r' from LINE.
=2D                             (loop (cons (string-drop-right line 1)
=2D                                         lines))))))))
=2D         (close-port port)
=2D         (waitpid pid)
=2D         result))))
+       (let* ((port   (fdopen controller "r+l")))
+         (dynamic-wind
+           (const #t)
+           (lambda ()
+             (display script port)
+             ;; Wait until the shell is done writing to the temporary file.
+             (waitpid pid)
+             (let loop ((lines '()))
+               ;; Read from the temporary file, not from the controller po=
rt, to
+               ;; prevent the shell's PS1 prompt from getting mixed into w=
hat we
+               ;; read.  See: https://issues.guix.gnu.org/51466
+               (match (read-line temporary-file-port)
+                 ((? eof-object?) (reverse lines))
+                 ("GUIX-CHECK-DONE"
+                  (reverse lines))
+                 (line
+                  (loop (cons line lines))))))
+           (lambda ()
+             (close-port temporary-file-port)
+             ;; The temporary file might not exist if something weird happ=
ens
+             ;; in the child shell that prevents it from even writing to t=
he
+             ;; file (e.g. the shell fails to start for some reason).
+             (false-if-exception (delete-file temporary-file))
+             (close-port port)))))))
=20
   (fold (lambda (line table)
           ;; Note: 'set' in fish outputs "NAME VALUE" instead of "NAME=3DV=
ALUE"

base-commit: 319b8331b2357e12ec9edb9665513c32bef56622
=2D-=20
2.34.0


--=-=-=--

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

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

iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmK20GYVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadIeYQAL0LO5v81twAns5KehxoYWL9R+WS
vgWzIixh7PaJygwBd1j8ijY26+ktvRRxUUsU3eYW/YOKdHAFYzVD3RtO4Tmmq5tf
+/9rFAJTFqJGvvyjDm1d44/uO3olR/fwVGPHHjjWmpX7XH5vVlNYzToU2VOEwthe
94/EGBpCzzjXWG7vnQOVJaaRcUL0KA/4eWw4RzXPUgulmGSjtFlpgPgRdJE7Q7g2
VxxER6KeNWSoOGw7AtsCYiTi/qa3dYdXxMORgVMjNBSqnM4OB4QKYilxqxCwT+Ds
TE3wFkOhTrKtVqoPTmUq6FVPpI7RBZdqI23HrfMloeeOzwRZ4VOvKJRjGzl7VWaB
khuibJiwQGQtQtNZKjwwB27NANTCs7F2MnJNd3Lubgr1wlotlxxCfopse3znoIcg
KUUmIeclHszqVAS0Cecp69VWO0Pwj1UobRqtB7BZhuNLGjM9nC7uQWL0JD+k1PdL
TjGGX34fEZsiofgerul+5m7AWJBg4hQMOqG0m33ha19WFqjhM6nggiFSbyFIJb/Y
6K9IjksS8FBhYK9mAXlRjNbM8HmKREK7KY/71k5YCY+qpQTcP13985XNXVBKLfRG
C/lVSRX3pUcZ10QXc8tygVlQ1Ns2F0KM+zvF/xSzWOx0H5oieKszQTSHJdPdt6R7
bMJbCBQ0tsY6PgLE
=Cy8Z
-----END PGP SIGNATURE-----
--==-=-=--




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Maxime Devos <maximedevos@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sat, 25 Jun 2022 09:38:02 +0000
Resent-Message-ID: <handler.51466.B51466.165614986926181 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165614986926181
          (code B ref 51466); Sat, 25 Jun 2022 09:38:02 +0000
Received: (at 51466) by debbugs.gnu.org; 25 Jun 2022 09:37:49 +0000
Received: from localhost ([127.0.0.1]:44126 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o52Ef-0006oD-K5
	for submit <at> debbugs.gnu.org; Sat, 25 Jun 2022 05:37:49 -0400
Received: from laurent.telenet-ops.be ([195.130.137.89]:38530)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1o52Ee-0006o4-C7
 for 51466 <at> debbugs.gnu.org; Sat, 25 Jun 2022 05:37:48 -0400
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by laurent.telenet-ops.be with bizsmtp
 id nMdm2700K4UW6Th01MdmVR; Sat, 25 Jun 2022 11:37:47 +0200
Message-ID: <0b1765dfff5401fa06ee25779b7f173230bf4ea4.camel@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Date: Sat, 25 Jun 2022 11:37:46 +0200
In-Reply-To: <875ykpdsbd.fsf_-_@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-Z4DRsn4+tnJ89KMkyjJ9"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1656149867; bh=1hlCV+Lw5up9+6y5u3mX6KQ8S861p2lXyw+vo8b7sc0=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=PQryZGGIMRDcDUgXpGq8rUhFm16cxCrirAi/g9gTPK0NSfXKSYekDEgJBFmoRaWwG
 YBqS27aXXva8/sG7PePlrYpeiIEDPqLHhUNEiGp/wffpDtkrAF0j2lHA7uSVhnEJxi
 JhbLqIHiyOMyGOpDshJzo48P3zNrTV+GG03zTCL4UbMX+ewTolKNLLLNBJHmI+948d
 ceGXwSNBC1DplCWoq5xvu+cxMxXcIsHRAYZu8j4JzW6hjd0WsA2zYmgyZqECiT2vNb
 3LP33XxbPOLUKBGOl/jlocF7yvHaMZayyaPVqNcuUvQQ/8f9qKwLsymU3ZicmnuPkn
 TTC0ju9i+EQNw==
X-Spam-Score: -0.0 (/)
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 (-)


--=-Z4DRsn4+tnJ89KMkyjJ9
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Chris Marusich schreef op za 25-06-2022 om 02:07 [-0700]:
> It turns out that it is probably not OK to rely on shell redirection
> in
> this case, after all.=C2=A0 For example, "dash does not support multi-
> digit
> file descriptors":
>=20
> https://bugs.launchpad.net/ubuntu/+source/dash/+bug/249620

I consider temporary files to be more fragile -- you have to take care
of file permissions, removing the file afterwards even after an
interrupt with C-c, deleting the temporary file can fail, there might
be an out-of-space error, in case of file system corruption things
might be remounted read-only, some other program could read, write or
delete the file ..., so I think it would be best to just fix the bug in
dash instead.

Greetings,
Maxime.

--=-Z4DRsn4+tnJ89KMkyjJ9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrbXahccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uN1AP4u9LnHq6nIV9yEQ7ccgSkMGy7W
V8Gf1H38sdbvtlwlRgD9EhTjo5zuUvKGHo1lTkI6hseR0SCDTYXCVa7GNcD11Ag=
=frxf
-----END PGP SIGNATURE-----

--=-Z4DRsn4+tnJ89KMkyjJ9--





Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Chris Marusich <cmmarusich@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sat, 25 Jun 2022 16:53:01 +0000
Resent-Message-ID: <handler.51466.B51466.165617596123510 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Maxime Devos <maximedevos@HIDDEN>
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165617596123510
          (code B ref 51466); Sat, 25 Jun 2022 16:53:01 +0000
Received: (at 51466) by debbugs.gnu.org; 25 Jun 2022 16:52:41 +0000
Received: from localhost ([127.0.0.1]:46131 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o591U-000676-Tf
	for submit <at> debbugs.gnu.org; Sat, 25 Jun 2022 12:52:41 -0400
Received: from mail-pj1-f54.google.com ([209.85.216.54]:39855)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cmmarusich@HIDDEN>)
 id 1o591S-00066r-QY; Sat, 25 Jun 2022 12:52:39 -0400
Received: by mail-pj1-f54.google.com with SMTP id
 b12-20020a17090a6acc00b001ec2b181c98so8482191pjm.4; 
 Sat, 25 Jun 2022 09:52:38 -0700 (PDT)
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=EZAcUrdmuavU8jyQ80XyxtScPMkwrlxB1lh4ipTfrUo=;
 b=k75x95DWwkJHTMdaofi/Vl79Xl1bgdx70OIs8PIp0G8Xvyku11hB9VBq9bFd/qzVir
 05lACjY4AKsGtmHCahBcK3xTT43fwb6O2IqrpDK9zx9scwr/Dxz6lQMRBUezqhrU2xr+
 PVkNopKspyz3pzvTaQevbcuZqJluTCeasznknt8XVhTCRM+sve4zmSdaNPvOJGiUJILj
 7SM1K/fuvkFF7qxWjrM07STBpsLcx2ExzJNYMZXSdgtcY+nqOs/uZBkeDDcw+N/HarqK
 OjmEGRI/bhMngzvkiNqSM1ojIRF0ZjewZH7x7/79xSEvYJAcj2qZH+M59Kchf/OYUpen
 t9gA==
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=EZAcUrdmuavU8jyQ80XyxtScPMkwrlxB1lh4ipTfrUo=;
 b=VRLQXKzsvRQt9VBGZx9jDM4pTlnz9CsTxjGUA8WvY3GMSQrMAugE7QEZSntb/wOsV/
 /Dxh6xTFSuW1SV4CXEsLwIRqTuqJam10gU7xLsXjwSJXn6sszWYJVsSx5M9PlQd3xLOc
 qb5KmP6EXjxgxerX84TbChe6Lc4bau1kaF9EgfKeQUQ+0FDLQj7sLPh59cp1FPzJpCy8
 7SkPd/e5yjgeuUZUapDgofo2rknSREFPbopZWlFyALBkBXvRvdlhTH4leI1dVFtUbww5
 rYbgOclEMgkfoherFi/6HdxYYEvt5EZlugEJW8Of5lsityNNoV+mk9LqzlZiTlYV3ocM
 +HXg==
X-Gm-Message-State: AJIora8vV6KAkq71W0Xf/hwUuYPB335SxeYKOCcm8IJccYkG+BnFP/4H
 OyqwgrGKhn8PZj9BhxNYlM//24ZMa84=
X-Google-Smtp-Source: AGRyM1vPyxjYtAYJKjx7pNUlcR3erCuf0I7SYyaoaGoeytek7lxWJ6ZqM84NP0d/x3OhmMvQnaiqQA==
X-Received: by 2002:a17:90b:4ac9:b0:1ec:9bd1:92ff with SMTP id
 mh9-20020a17090b4ac900b001ec9bd192ffmr5304422pjb.178.1656175951430; 
 Sat, 25 Jun 2022 09:52:31 -0700 (PDT)
Received: from fedora ([2601:1c0:c800:53d0::aafd])
 by smtp.gmail.com with ESMTPSA id
 f13-20020a170902684d00b0016a68098e8fsm3768070pln.242.2022.06.25.09.52.29
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 25 Jun 2022 09:52:30 -0700 (PDT)
From: Chris Marusich <cmmarusich@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
 <0b1765dfff5401fa06ee25779b7f173230bf4ea4.camel@HIDDEN>
Date: Sat, 25 Jun 2022 09:52:26 -0700
In-Reply-To: <0b1765dfff5401fa06ee25779b7f173230bf4ea4.camel@HIDDEN>
 (Maxime Devos's message of "Sat, 25 Jun 2022 11:37:46 +0200")
Message-ID: <87y1xkwur9.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-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 Maxime,

Maxime Devos <maximedevos@HIDDEN> writes:

> Chris Marusich schreef op za 25-06-2022 om 02:07 [-0700]:
>> It turns out that it is probably not OK to rely on shell redirection
>> in
>> this case, after all.=C2=A0 For example, "dash does not support multi-
>> digit
>> file descriptors":
>>=20
>> https://bugs.launchpad.net/ubuntu/+source/dash/+bug/249620
>
> I consider temporary files to be more fragile -- you have to take care
> of file permissions, removing the file afterwards even after an
> interrupt with C-c, deleting the temporary file can fail, there might
> be an out-of-space error, in case of file system corruption things
> might be remounted read-only, some other program could read, write or
> delete the file ..., so I think it would be best to just fix the bug in
> dash instead.

Yes, I agree those are good reasons to avoid a temporary file if we can.
To that end, do you know if we can somehow force Guile to use a specific
file descriptor for the pipe?  In the patch I wrote earlier, which uses
redirection, the problem was that I could not control Guile's choice of
file descriptors.  Guile chose file descriptor 19 for one end of the
pipe, and I don't know how to make it use anything else.  If we can
arrange for Guile to consistently use file descriptor 7, for example,
then probably it would work in all the shell I've tested.

I wonder if maybe I can just duplicate the file descriptor?  I don't
know; if for example Guile reserves all the file descriptors below 10
for other uses, it might be hard.

What do you think?  Is there a way to do it?

=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+x3UCaFdgiRp0FAmK3PUoVHGNtbWFydXNp
Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadFZcQAL0FO531KUuCaeazN5nba4ZP/aPS
1qjXKKrWxU9QR2r1HZERoCglSBxOp2Kpkl81mD/3am6hvZWS9Z0h1uIHEh8NzPzB
eU6gfZKG26PLD3h2o8ffrxT8UiTuzzFmyRopPnyKIqIxi6yOu9CZENS0Yxrp9D/I
GllMJBKRaGYJxidLRhq3uhn6AiEKKSNt6FP3BkSbqmZqrPKGXv1JWVCHDkVG0zXS
3A67Dm9Fk6xP974NjyfDLW3gOkRmRFkRekg8dDNDlh607iHErWmODF5i7XMn8qjp
pcXmxGiy9PEGcJd9Y8ZIH9s++96PsZjtWPNvl31gzOaG7RFNuW2itz5xiHhvl8e1
qlXoTNOBKa2qqSXNKn98j+u+RPkxYtnjabLCVh1HPr+RvsMankZgKi3fDX3SQQ+U
kH4bPjCyvxHzQuOtj0dVCAoYkBwWxOLu+qL1+7KRwhWowBKyDXDnGmHweeCGSsEJ
3H0Z5s5RqpHeJDZJkoTsJeS7bjZyeivw1Ktg4Rp/GCk/H/oioEoKPk8YWMrAH/T7
65Bq4tcgFODnPenB29a7XiUa6/s3Ov/GGXtD4Sex97acMtPImiMlGn4Vrr+aazVZ
Ef+QsquE5SqmifhOZeVkW/duLrQucFhNJX+QipNmXzpwcrinr7HSRY6vF9KrJy9F
33Oj910Xl4imyP8K
=0+4i
-----END PGP SIGNATURE-----
--=-=-=--




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Maxime Devos <maximedevos@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sat, 25 Jun 2022 17:41:02 +0000
Resent-Message-ID: <handler.51466.B51466.165617885928135 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165617885928135
          (code B ref 51466); Sat, 25 Jun 2022 17:41:02 +0000
Received: (at 51466) by debbugs.gnu.org; 25 Jun 2022 17:40:59 +0000
Received: from localhost ([127.0.0.1]:46172 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o59mE-0007Jh-T6
	for submit <at> debbugs.gnu.org; Sat, 25 Jun 2022 13:40:59 -0400
Received: from andre.telenet-ops.be ([195.130.132.53]:37730)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1o59mB-0007JR-BG
 for 51466 <at> debbugs.gnu.org; Sat, 25 Jun 2022 13:40:57 -0400
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by andre.telenet-ops.be with bizsmtp
 id nVgt270014UW6Th01Vgtfn; Sat, 25 Jun 2022 19:40:53 +0200
Message-ID: <bf5b3b83c03de0c5056255ea60a3d0b4f8036478.camel@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Date: Sat, 25 Jun 2022 19:40:48 +0200
In-Reply-To: <87y1xkwur9.fsf_-_@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
 <0b1765dfff5401fa06ee25779b7f173230bf4ea4.camel@HIDDEN>
 <87y1xkwur9.fsf_-_@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-epwf12yb5OHm2trL6Zzw"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1656178853; bh=cc4Ozochtqf6Xz4T8OyoLWfXAjcI/NkjhU0ym/asoLo=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=Ao9rYc3LhK8e0KIuzgIO5bd4oziNQD2Pr2TGUBbuPR0/9FS/sQUyJg2Ots2UpWinn
 OlQjYQuG73CrR57YFBy7I7UcDyH2s2xOzjYbO9Tt8tyaWsea7OvjRq+ZNDsAmJMUeY
 IUClGZ8vDP3LwowQY60Ucc5b0ViwFMIE3e0Iu7Cc97NTQ39JLO2bySErv/EFN9D3NL
 hD3MxxsS/AIcMRQ+jw4TXI84g8nMdKuEHaMcLgwrq9ToqeoHYDmMtU20ZcnW7Jn8gT
 Ko075TZoxM6jvyrunv9p9GikfHSqVraceGmusCf2RW0iANwARtCW8z7U7bmoaB9Wns
 fvb7HSXnGB3Tw==
X-Spam-Score: -0.0 (/)
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 (-)


--=-epwf12yb5OHm2trL6Zzw
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Chris Marusich schreef op za 25-06-2022 om 09:52 [-0700]:
> Yes, I agree those are good reasons to avoid a temporary file if we
> can.
> To that end, do you know if we can somehow force Guile to use a
> specific
> file descriptor for the pipe?=C2=A0 In the patch I wrote earlier, which
> uses
> redirection, the problem was that I could not control Guile's choice
> of
> file descriptors.=C2=A0 Guile chose file descriptor 19 for one end of the
> pipe, and I don't know how to make it use anything else.=C2=A0 If we can
> arrange for Guile to consistently use file descriptor 7, for example,
> then probably it would work in all the shell I've tested.
>=20
> I wonder if maybe I can just duplicate the file descriptor?=C2=A0 I don't
> know; if for example Guile reserves all the file descriptors below 10
> for other uses, it might be hard.
>=20

Have a look at =E2=80=98(guile)Ports and File Descriptors=E2=80=99.  It has=
 lots of
procedures for duplicating and renumbering.  That's fragile though, you
might accidentally overwrite an fd that's being used for something
else.

(Normally move->fdes would prevent overwriting things by moving pre-
existing fds out of the way, adjusting ports automatically, but move-
>fdes doesn't know (yet) about the pipe that Guile uses for
finalisation, see maybe:
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D48563>)

I think it would be best to patch the dash appropriately (though fixing
move->fdes would be nice too).

Greetings,
Maximee.

--=-epwf12yb5OHm2trL6Zzw
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrdIoBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vQAAPsF2xA7luLZF2c5ndGS+TZax0PZ
bD4L7+9G3f+/kTmeVgD/csEhB34Sh/+JlOiN2WpLjGUFu8O/J/+ZNVhW6+ZSvAk=
=z7BE
-----END PGP SIGNATURE-----

--=-epwf12yb5OHm2trL6Zzw--





Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: bokr@HIDDEN
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sat, 25 Jun 2022 20:08:01 +0000
Resent-Message-ID: <handler.51466.B51466.16561876359649 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Maxime Devos <maximedevos@HIDDEN>
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Chris Marusich <cmmarusich@HIDDEN>, 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.16561876359649
          (code B ref 51466); Sat, 25 Jun 2022 20:08:01 +0000
Received: (at 51466) by debbugs.gnu.org; 25 Jun 2022 20:07:15 +0000
Received: from localhost ([127.0.0.1]:46247 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5C3m-0002VY-IT
	for submit <at> debbugs.gnu.org; Sat, 25 Jun 2022 16:07:14 -0400
Received: from mailout.easymail.ca ([64.68.200.34]:52444)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bokr@HIDDEN>)
 id 1o5C3h-0002VE-OS; Sat, 25 Jun 2022 16:07:13 -0400
Received: from localhost (localhost [127.0.0.1])
 by mailout.easymail.ca (Postfix) with ESMTP id 2CAF8E21CA;
 Sat, 25 Jun 2022 20:07:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1656187624; bh=v/ZCgy20FdCTzk2Lawp4bN+em01WJ0n6GBjAjJ1JbCo=;
 h=From:Date:To:Cc:Subject:References:In-Reply-To:From;
 b=itH1Gz1WFPmIiTUmuUwyRLr1XqFrZdLi9IhKM6fZzu0f8eh+3b0CliXPfH0iVXJMt
 IH6J/tGZTPy7UXu64lMi/9y18KktEKIPapjxbvMGTHJSyrxIOwYYUdPkdMm1a0uuL0
 HfIk4TFic1TDtrV+DYcMpozlBWEkm+ihlVMJcr9MpfdFd6B6nsmHTiQW9k84gS77ix
 sqZCpFtETLRUZbLnSgI5TC9e0nc/QGaytPADRtcoUflwYLN9FXNmG3EI7HSK9nZk4D
 OUOC5PHfDu3Dyz9jILSx1CMgB1UbgQnYNEXUwS1dhorIGMnx3S7X70mbi3+k9uVggy
 x9OFXIsx9Su/Q==
X-Virus-Scanned: Debian amavisd-new at emo08-pco.easydns.vpn
Received: from mailout.easymail.ca ([127.0.0.1])
 by localhost (emo08-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 2goac5yBtaQS; Sat, 25 Jun 2022 20:07:03 +0000 (UTC)
Received: from localhost (m90-129-195-180.cust.tele2.se [90.129.195.180])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
 SHA256) (No client certificate requested)
 by mailout.easymail.ca (Postfix) with ESMTPSA id 3DF84E21C8;
 Sat, 25 Jun 2022 20:07:03 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1656187623; bh=v/ZCgy20FdCTzk2Lawp4bN+em01WJ0n6GBjAjJ1JbCo=;
 h=From:Date:To:Cc:Subject:References:In-Reply-To:From;
 b=aZlxro+hIVZFwOO2fGShjcyBZ5qagARZdbfXP5ERgxkHg6lLk5NYAUDQDkGdMzdsM
 e/QzkqFS/Bj9CS4ZnqVA8VlwTBSzaOAvRsYhj3SCAZGxlGmlmpSJobk8/BYtw2fI6n
 E24v6SALVUc/7Kex8tv16qMsjTQZPTI1TknEIakt5YDWE4+brbFfJR1k1q+5LJmKW9
 PjHNnkCFhUlo9wGsyohQmfN/rCrF4NlIl/gMxOuMNEGg9Ayk77+ex9tPJ1oiiyikJF
 fPvMbSnZwq4FXawXkMV61H3twL2MJLPNMaYG1oZJUKKQYIwkI5TOTftbVGF8E5Q+23
 gHaB/1SoOJcoA==
From: bokr@HIDDEN
Date: Sat, 25 Jun 2022 22:06:46 +0200
Message-ID: <20220625200646.GA8075@LionPure>
References: <87h79slysd.fsf@HIDDEN> <87sft13dyv.fsf@HIDDEN>
 <874k59d802.fsf@HIDDEN> <87wnhy2w73.fsf_-_@HIDDEN>
 <878rudzsmv.fsf@HIDDEN> <87sfozzglf.fsf_-_@HIDDEN>
 <875ykpdsbd.fsf_-_@HIDDEN>
 <0b1765dfff5401fa06ee25779b7f173230bf4ea4.camel@HIDDEN>
 <87y1xkwur9.fsf_-_@HIDDEN>
 <bf5b3b83c03de0c5056255ea60a3d0b4f8036478.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <bf5b3b83c03de0c5056255ea60a3d0b4f8036478.camel@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Spam-Score: -2.3 (--)
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 (---)

On +2022-06-25 19:40:48 +0200, Maxime Devos wrote:
> Chris Marusich schreef op za 25-06-2022 om 09:52 [-0700]:
> > Yes, I agree those are good reasons to avoid a temporary file if we
> > can.
> > To that end, do you know if we can somehow force Guile to use a
> > specific
> > file descriptor for the pipe?  In the patch I wrote earlier, which
> > uses
> > redirection, the problem was that I could not control Guile's choice
> > of
> > file descriptors.  Guile chose file descriptor 19 for one end of the
> > pipe, and I don't know how to make it use anything else.  If we can
> > arrange for Guile to consistently use file descriptor 7, for example,
> > then probably it would work in all the shell I've tested.
> > 
> > I wonder if maybe I can just duplicate the file descriptor?  I don't
> > know; if for example Guile reserves all the file descriptors below 10
> > for other uses, it might be hard.
> > 
> 
> Have a look at ‘(guile)Ports and File Descriptors’.  It has lots of
> procedures for duplicating and renumbering.  That's fragile though, you
> might accidentally overwrite an fd that's being used for something
> else.
> 
> (Normally move->fdes would prevent overwriting things by moving pre-
> existing fds out of the way, adjusting ports automatically, but move-
> >fdes doesn't know (yet) about the pipe that Guile uses for
> finalisation, see maybe:
> <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=48563>)
> 
> I think it would be best to patch the dash appropriately (though fixing
> move->fdes would be nice too).
> 
> Greetings,
> Maximee.

Could this help?:

(from man 2 openat (scroll down a fair bit):
-8<---------------cut here---------------start------------->8---
  There are two main use cases for O_TMPFILE:

  *  Improved tmpfile(3) functionality: race-free creation of temporary files that (1) are automatically
     deleted  when closed; (2) can never be reached via any pathname; (3) are not subject to symlink at‐
     tacks; and (4) do not require the caller to devise unique names.

  *  Creating a file that is initially invisible, which is then populated with data and adjusted to have
     appropriate  filesystem  attributes (fchown(2), fchmod(2), fsetxattr(2), etc.)  before being atomi‐
     cally linked into the filesystem in a fully formed state (using linkat(2) as described above).

  O_TMPFILE requires support by the underlying filesystem; only a subset of  Linux  filesystems  provide
  that  support.   In  the  initial  implementation,  support was provided in the ext2, ext3, ext4, UDF,
  Minix, and shmem filesystems.  Support for other filesystems has subsequently been added  as  follows:
  XFS (Linux 3.15); Btrfs (Linux 3.16); F2FS (Linux 3.16); and ubifs (Linux 4.9)
--8<---------------cut here---------------end--------------->8---

BTW, IIRC, this can be used to create an invisible file that
can be mmap-ed, and the mmap will persist when you delete
the file. Which then can be used as an anonymous buffer
passed to wayland, along with metadate saying what the buffer
contains, e.g. different kinds of rgb or rgba permutations
and encodings, (or anything, which you can tell wayland just
to keep track of for you.

You need a directory for openat, so probably
    XDG_RUNTIME_DIR=/run/user/1000
is suitable if it exists. Worked in my case.

HTH
--
Regards,
Bengt Richter




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Maxime Devos <maximedevos@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sat, 25 Jun 2022 21:05:01 +0000
Resent-Message-ID: <handler.51466.B51466.165619106815121 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: bokr@HIDDEN
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Chris Marusich <cmmarusich@HIDDEN>, 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165619106815121
          (code B ref 51466); Sat, 25 Jun 2022 21:05:01 +0000
Received: (at 51466) by debbugs.gnu.org; 25 Jun 2022 21:04:28 +0000
Received: from localhost ([127.0.0.1]:46300 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5Cx9-0003vp-Rc
	for submit <at> debbugs.gnu.org; Sat, 25 Jun 2022 17:04:28 -0400
Received: from andre.telenet-ops.be ([195.130.132.53]:33102)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1o5Cwt-0003vK-Ol
 for 51466 <at> debbugs.gnu.org; Sat, 25 Jun 2022 17:04:26 -0400
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by andre.telenet-ops.be with bizsmtp
 id nZ4A270074UW6Th01Z4A3d; Sat, 25 Jun 2022 23:04:10 +0200
Message-ID: <57148fd1c1991ee6bddc88dbccf4118afeaba10a.camel@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Date: Sat, 25 Jun 2022 23:04:10 +0200
In-Reply-To: <20220625200646.GA8075@LionPure>
References: <87h79slysd.fsf@HIDDEN> <87sft13dyv.fsf@HIDDEN>
 <874k59d802.fsf@HIDDEN> <87wnhy2w73.fsf_-_@HIDDEN>
 <878rudzsmv.fsf@HIDDEN> <87sfozzglf.fsf_-_@HIDDEN>
 <875ykpdsbd.fsf_-_@HIDDEN>
 <0b1765dfff5401fa06ee25779b7f173230bf4ea4.camel@HIDDEN>
 <87y1xkwur9.fsf_-_@HIDDEN>
 <bf5b3b83c03de0c5056255ea60a3d0b4f8036478.camel@HIDDEN>
 <20220625200646.GA8075@LionPure>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-nqvSomso0639+XeLzv0f"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1656191050; bh=99UoVcw9/L7C0ZFVcHOZ/VZZ2+Fs2Z1xDDFDC0Ty+bc=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=Vh9hNp7W/QVK+fdj7Lu7JW+B7pvm/bux2hkOT+DIg3vQRu6/0er+kpgxDkv50DEM2
 +ozMWDCYylz24zyrz7XiqkDsyVzai8kJFtnwimy9eFqO20BoV5s3L5A6XcDBxPZfXu
 uQ9KqvUxjcOB/94Pd8Z0hCKCFXRYraImhfuewSqNJF+7sP6WTK3ynLhLl4Oi9iZoXQ
 yw+FMemBITTtjIz4Lu037PQ4KYtZMju++bht9EMA2WuYP1WNM35Awcd3qFKbpY0pF6
 +lVGy8qKf8XafMucJsPdMykNboV7QCgIa7svDo93uUtmz7vFpUNpvrOsxomOlljXgG
 Bv6zI+FZXhpAg==
X-Spam-Score: 0.0 (/)
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 (-)


--=-nqvSomso0639+XeLzv0f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

bokr@HIDDEN schreef op za 25-06-2022 om 22:06 [+0200]:
> BTW, IIRC, this can be used to create an invisible file that

Invisible files don't have file names, so they cannot be put in the
tiny shell script:

> +    (format
> +     #f "env >~a || /usr/bin/env >~a || set >~a; \
> +echo GUIX-CHECK-DONE >>~a; exit\n"
> +     temporary-file temporary-file temporary-file temporary-file))

Also, I just noticed that this tiny shell script isn't quoting
anything, so you'll get in trouble if $TMPDIR (or was it $TEMPDIR,
whatever) contains " or ' or \ or whatever.

So to avoid messy and fragile escaping, I'd recommend to work with file
descriptors.

Greetings,
Maxime.

--=-nqvSomso0639+XeLzv0f
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrd4ShccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tm/AQD/oGnY+tMcGXiGGhnWuhszC8rr
Uc43dKvEAmJNnMdfXAEA2r86MfXxbcfBQ/TwOIkKGxijsfu8P6EfYL7xG1RZFw4=
=jqO8
-----END PGP SIGNATURE-----

--=-nqvSomso0639+XeLzv0f--





Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Josselin Poiret <dev@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sun, 26 Jun 2022 10:34:02 +0000
Resent-Message-ID: <handler.51466.B51466.16562396234020 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Maxime Devos <maximedevos@HIDDEN>, Chris Marusich <cmmarusich@HIDDEN>
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.16562396234020
          (code B ref 51466); Sun, 26 Jun 2022 10:34:02 +0000
Received: (at 51466) by debbugs.gnu.org; 26 Jun 2022 10:33:43 +0000
Received: from localhost ([127.0.0.1]:46785 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5PaJ-00012k-4x
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 06:33:43 -0400
Received: from jpoiret.xyz ([206.189.101.64]:48442)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dev@HIDDEN>)
 id 1o5PaH-00012Z-JS; Sun, 26 Jun 2022 06:33:42 -0400
Received: from authenticated-user (jpoiret.xyz [206.189.101.64])
 by jpoiret.xyz (Postfix) with ESMTPA id 16A681851E0;
 Sun, 26 Jun 2022 10:33:38 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim;
 t=1656239619;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=u8l/DZvu/jBeU7R+ss5Z8c6/BQAPpQApgf9LyoI4y4Y=;
 b=P5fvHoym+Oa57HTi7L2wVIVHGHypTogiQR5dBAk08+AYR24hOAdOb0k48/KV7uEGgOyEIK
 ssfcZekH5M5+1l25qhDbOC2daRN1lZFk2srzCvmcP9jg76niLlaVXgHurwNNEglUuK72ij
 ZmL5bGWtsy+X/y1He4a8QbwsD7tT6CAUqJcYg1XpAmc3Jwb40taExadvjMYie6GwY76fjn
 69YoZkdS53fzU1gbh9JNOoHCv90HPWHFFUyPnwJl/1X5EvHk0fLHfX5lmJnF+WNg6VMigR
 5OSEangSkuv/SGIcb2UGnazkt8H3ZHfVM7gJN8m1+9Vr2dglojYo6J36j2PybQ==
From: Josselin Poiret <dev@HIDDEN>
In-Reply-To: <bf5b3b83c03de0c5056255ea60a3d0b4f8036478.camel@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
 <0b1765dfff5401fa06ee25779b7f173230bf4ea4.camel@HIDDEN>
 <87y1xkwur9.fsf_-_@HIDDEN>
 <bf5b3b83c03de0c5056255ea60a3d0b4f8036478.camel@HIDDEN>
Date: Sun, 26 Jun 2022 12:33:37 +0200
Message-ID: <87zghzsohq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Authentication-Results: jpoiret.xyz;
 auth=pass smtp.auth=jpoiret@HIDDEN smtp.mailfrom=dev@HIDDEN
X-Spamd-Bar: /
X-Spam-Score: 2.1 (++)
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:  Hello everyone, Maxime Devos <maximedevos@HIDDEN> writes:
    > Chris Marusich schreef op za 25-06-2022 om 09:52 [-0700]: >> [...] >> the
    problem was that I could not control Guile's choice >> of >> file =?UTF-8?Q?descriptors.=C2=A0?=
    Guile chose file descriptor 19 for one end [...] 
 
 Content analysis details:   (2.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 SPF_PASS               SPF: sender matches SPF record
  1.6 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: jpoiret.xyz (xyz)]
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
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.1 (++)
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:  Hello everyone, Maxime Devos <maximedevos@HIDDEN> writes:
    > Chris Marusich schreef op za 25-06-2022 om 09:52 [-0700]: >> [...] >> the
    problem was that I could not control Guile's choice >> of >> file =?UTF-8?Q?descriptors.=C2=A0?=
    Guile chose file descriptor 19 for one end [...] 
 
 Content analysis details:   (2.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 SPF_PASS               SPF: sender matches SPF record
  1.6 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: jpoiret.xyz (xyz)]
  1.0 BULK_RE_SUSP_NTLD      Precedence bulk and RE: from a suspicious TLD
  0.5 FROM_SUSPICIOUS_NTLD   From abused NTLD
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

Hello everyone,=20

Maxime Devos <maximedevos@HIDDEN> writes:

> Chris Marusich schreef op za 25-06-2022 om 09:52 [-0700]:
>> [...]
>> the problem was that I could not control Guile's choice
>> of
>> file descriptors.=C2=A0 Guile chose file descriptor 19 for one end of the
>> pipe, and I don't know how to make it use anything else.=C2=A0 If we can
>> arrange for Guile to consistently use file descriptor 7, for example,
>> then probably it would work in all the shell I've tested.
> Have a look at =E2=80=98(guile)Ports and File Descriptors=E2=80=99.  It h=
as lots of
> procedures for duplicating and renumbering.  That's fragile though, you
> might accidentally overwrite an fd that's being used for something
> else.

Just my 2=C2=A2, from my experience, Guile uses a lot of fds (`guile -q` us=
es
15).  I'm not sure it would be safe or advisable to move fds, since we
cannot be sure that they're backing ports or not, and if they're not it
would break things.  In general, the Guile ports/fds interface works ok,
but there is a lot of code that is fragile and doesn't handle
edge-cases.

Best,
--=20
Josselin Poiret




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Maxime Devos <maximedevos@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sun, 26 Jun 2022 13:08:02 +0000
Resent-Message-ID: <handler.51466.B51466.165624883711344 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Josselin Poiret <dev@HIDDEN>, Chris Marusich <cmmarusich@HIDDEN>
Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165624883711344
          (code B ref 51466); Sun, 26 Jun 2022 13:08:02 +0000
Received: (at 51466) by debbugs.gnu.org; 26 Jun 2022 13:07:17 +0000
Received: from localhost ([127.0.0.1]:46931 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5Ryv-0002wt-El
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 09:07:17 -0400
Received: from albert.telenet-ops.be ([195.130.137.90]:41284)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1o5Ryr-0002wc-1A
 for 51466 <at> debbugs.gnu.org; Sun, 26 Jun 2022 09:07:16 -0400
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by albert.telenet-ops.be with bizsmtp
 id np7B2700A4UW6Th06p7Ba2; Sun, 26 Jun 2022 15:07:11 +0200
Message-ID: <dbfb99620519cc205697520858ece50c603ac9f9.camel@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Date: Sun, 26 Jun 2022 15:07:11 +0200
In-Reply-To: <87zghzsohq.fsf@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
 <0b1765dfff5401fa06ee25779b7f173230bf4ea4.camel@HIDDEN>
 <87y1xkwur9.fsf_-_@HIDDEN>
 <bf5b3b83c03de0c5056255ea60a3d0b4f8036478.camel@HIDDEN>
 <87zghzsohq.fsf@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-VkZ+fiDtUdeW2T4D7FHS"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1656248831; bh=2k5JxD62cP/YfMnqHUftFhhsqOf40linC0E+I77+8n4=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=PQy9bK4KVRkCiGV256WFil+3WZgWyiWhTrnKZN+d0FBvKN70PYvnm+BX4UdHJkd5H
 963/C6zyfl+IN8dZ97AcJgrvCm+162FjC4P3p3/WFdHEgonGuHOQHMUrq24ntcGpFa
 CBhVk+wS3DnLqpz8ZnVrW35tQXod6Jzc8435M+0JZxh7ZrmKw5nL6QGXb907rRjh3O
 SX01l3JsCabwXUZq7FiBh9ZHJBQG+OhA7SGatfUcqA4V9WJRPSY3VJoH4+wUhF0mem
 zSc/2Mksi8t3Il0Z0gKwewcENNWjKWiF5G5RDwvHoRwweVU2PqbPBklkhqyt9tfY+e
 1/LTbtTf14WMQ==
X-Spam-Score: -0.0 (/)
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 (-)


--=-VkZ+fiDtUdeW2T4D7FHS
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Josselin Poiret schreef op zo 26-06-2022 om 12:33 [+0200]:
> Just my 2=C2=A2, from my experience, Guile uses a lot of fds (`guile -q` =
uses
> 15).=C2=A0 I'm not sure it would be safe or advisable to move fds, since =
we
> cannot be sure that they're backing ports or not, and if they're not it
> would break things

As mentioned previously, move->fdes looks in the port table to see if
the file descriptor things are being moved too is still in use, and if
so, moves that (fd, port) out of the way first, so should be safe.

That only works if Guile knows about the fd though, and Guile currently
does not know about it's own finalisation pipe, which I think is the
cause of <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D48563>, so
currently still fragile ...

(To be clear, I still recommend just fixing dash ...)

--=-VkZ+fiDtUdeW2T4D7FHS
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrhZ/xccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kIVAQDT4E/eTeEQjy+tnX8Ld5l+BYlq
RynJC9UhzUm4jfLKuAD/RshvRqPwZuVQT+htxNv08h3+T+wCQSf028EMR600JQY=
=9BuJ
-----END PGP SIGNATURE-----

--=-VkZ+fiDtUdeW2T4D7FHS--





Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Tobias Geerinckx-Rice <me@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Sun, 26 Jun 2022 19:46:03 +0000
Resent-Message-ID: <handler.51466.B51466.165627273324124 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: 51466 <at> debbugs.gnu.org, maximedevos@HIDDEN, dev@HIDDEN, cmmarusich@HIDDEN
Cc: ludo@HIDDEN, 53355 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-guix@HIDDEN, Maxime Devos <maximedevos@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Chris Marusich <cmmarusich@HIDDEN>
X-Debbugs-Original-Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165627273324124
          (code B ref 51466); Sun, 26 Jun 2022 19:46:03 +0000
Received: (at 51466) by debbugs.gnu.org; 26 Jun 2022 19:45:33 +0000
Received: from localhost ([127.0.0.1]:49088 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5YCK-0006Ge-VY
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 15:45:33 -0400
Received: from tobias.gr ([80.241.217.52]:50086)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>)
 id 1o5YCF-0006A9-BA; Sun, 26 Jun 2022 15:45:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=IDa3a7+xr32ob
 mE8MtybJjQ4ho0o5swDcrblDgprmLM=;
 h=references:in-reply-to:subject:cc:
 to:from:date; d=tobias.gr; b=ax8M8ox2XPyGucMdC2PySfOYbY7NburkDWyFcd+Fi
 ceJ0zvmiLu8zDWDZAauTnwv96zMtzxHpUYgC3E2oLe03YKZdc+M3uqKPRJnhAEoEM10OBc
 USwK59aE8RCAiAknIR5AHa1Pn/zS8WkGdfGLEi8XTzi00W6USj17VR/J7WMoE8BYNRYe1q
 qw3WxamGVvBRnvrELqcla6iKM+XEXetjU3Jx0lBlBYfdCvblAE0m8OCXREvT+jcT0D41zU
 jEbWLz/Zh+M2Yv/emUU9S9sUxTMLWTguQOQKgE30LLJ+pOIEtiFBQRJUiS9OOBqpr/68om
 0aTjorjB2UaKw4mIlMnnQ==
Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 318f2018
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); 
 Sun, 26 Jun 2022 19:45:24 +0000 (UTC)
Date: Sun, 26 Jun 2022 19:45:24 +0000
From: Tobias Geerinckx-Rice <me@HIDDEN>
In-Reply-To: <dbfb99620519cc205697520858ece50c603ac9f9.camel@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
 <0b1765dfff5401fa06ee25779b7f173230bf4ea4.camel@HIDDEN>
 <87y1xkwur9.fsf_-_@HIDDEN>
 <bf5b3b83c03de0c5056255ea60a3d0b4f8036478.camel@HIDDEN>
 <87zghzsohq.fsf@HIDDEN>
 <dbfb99620519cc205697520858ece50c603ac9f9.camel@HIDDEN>
Message-ID: <A906227E-EF19-4A15-A6FE-6C6F032202E0@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Autocrypt: addr=me@HIDDEN; keydata=
 mQINBFVks2ABEACjGBPhWf/qx0L9OhEIrAFTimo5dHa1FLy0AHaHvxmwYSIdJmERYGiNle1rcOvw
 cFRtu8KJUsrs27Vgoso3qHJpghVitUUf0v3ZuXQT9kfuQLz1Y8pyMzHwVFMLiJVj4Z3y7CJk+xyZ
 cpSAMbyPINbFVEhsK+z+8ojVGuaiucZkib6b67ySG6Pp1bon8xVvosj71ZRjfXh1t4X8laWO7fQq
 itT9lmc6DxbE/4vIhR+Vb2MblaA+DyHoNHGGao89h4CO99lfzWzsux41DnEG9d317sJRQTig6Wja
 EKHXZRA9FbfogD4SDa2uQYCpTJpsVjAyZyu2fuJ+t0zJJ+Ai9qDY87P6hOyd+/n8Eh2Y4TbxJiDo
 XUT72XY/RfPH1qrMIP3EI/NNL4LQeGG1n+625k3OVWcRVXG2vRrB6qurLmGkLEmjXWCFD9cCRGfH
 LeajLm9sM+t/nZPZ3btetcmK9tM2EwivyLUNhrTk73UUnI4CSAzdO2cISqo9zSMtFgj2alqd2fOR
 s7CKfEn+5PquruDbp/Ej7dOOrjgWSCXLDDYXRrtaKrLz/dhqq5ftFYi9tUTTQecFotM08fPtu+Kw
 JMP2ySHCkUqp0GvrUCeSRPAJZsmJrd535y+LlRhnqb0mbG4dgMa8A6xhkFYugnqldy/q7kX1EmRI
 686N7bA6fh1MCQARAQABtCRUb2JpYXMgR2VlcmluY2t4LVJpY2UgPG1lQHRvYmlhcy5ncj6JAlIE
 EwEKADwCHgECF4ACGQECGwMWIQT1vFU0w28Ah7OdNu8cncT+udt8SwUCXpe0rAYLCQgHCgQFFQoJ
 CAsFFgMCAQAACgkQHJ3E/rnbfEu5IhAAk+0BW/twLmx1xMmeXn+I7Ne6SG3++0TRBduEaGWV3n59
 lX6XPZUQdAPpS4uy0H+c90Owkw+aWUEwfyOWphrxZRtR2cCOP/3Pxj3Vgtz5RkY4u27lMj15jqa/
 p7l2l256ZKJOegr9TvOWtkhMp5lxeVHT6f/44Kv/r/8mMCgSnLXYrEWPE462xI+mIJOanHLJb6No
 f2xLRCvXoLLp7Yejjv1dwOO71R9PMRhtNy46pZM1ylQ++UTkeSocJw4aNtiu0DHOkX9AlNBkutIx
 x07RpO+MqJKlzzLeQiC/fE5+dR2itRONopwXAqN3MuT7MonQo5XifBn+VK8i9xZWTXZDkWItWtCC
 8oIj4zwxwFWiTmMwwSbI3Wdd/11Zw3CLc4Gd0M6NVgvAnuErQXSgr4lrWhZcncvi4L6EJTc9AUSa
 8UWPF+S9t+CHTukpJmcYnsccMkOBhT7OZlmWBsylrYK/JTRWqgWSHWdSKmOuLK+MGDneOZEHkEcf
 jeXRWvmG7MSU5tE/p7NDLIg9vkvhQV9b0q4OtY65uNWbRe2QRJaYMDcYUAeSZzivRa8VaoVen6tb
 FvH44zpCxubn23ABl9YIzwvJC++r+H2qLdLpy0cfITiZadZ74Ae0aosNw7XARS6OY+A03BfXyPiI
 2oW0jf/PdH9sh2mQrQxIQJ5cZz6Z3X0=
X-Spam-Score: -0.0 (/)
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 (-)

On 26 June 2022 13:07:11 UTC, Maxime Devos <maximedevos@telenet=2Ebe> wrote=
:
>(To be clear, I still recommend just fixing dash =2E=2E=2E)

That's the long-term solution, but Guix needs a work-around regardless=2E


Kind regards,

T G-R

Sent on the go=2E  Excuse or enjoy my brevity=2E




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 27 Jun 2022 10:18:01 +0000
Resent-Message-ID: <handler.51466.B51466.16563250402062 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Chris Marusich <cmmarusich@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.16563250402062
          (code B ref 51466); Mon, 27 Jun 2022 10:18:01 +0000
Received: (at 51466) by debbugs.gnu.org; 27 Jun 2022 10:17:20 +0000
Received: from localhost ([127.0.0.1]:49887 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5lnz-0000XA-P0
	for submit <at> debbugs.gnu.org; Mon, 27 Jun 2022 06:17:19 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54788)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1o5lnw-0000Ws-21; Mon, 27 Jun 2022 06:17:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:35044)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o5lnq-0003xt-NV; Mon, 27 Jun 2022 06:17:10 -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=tq69ygapcaeSMPtR0e46Z1ob3EaoqV0nEqoigd4V6io=; b=BJLWYBpFcS15ktzUlQBm
 E+Ou6eBGxlFqVy/verjCXsfvAMsHS11DFdoS58lGYv86heQTo+MPtIuwm2izEnJsGJaUghIZlPBPf
 Kxo0LmWwriVlShnBW+pNCCB3qYCUcSj6/ZEqdcE91o6OGOcyS9hztk8bs11c1qmrJy9FxJJnfroyO
 ZnRN2iwl7MFUlsmgX5XgE3V4a6DMa5/hgl16sEdmyqDxzm1wEZLyZPOORFdkNr2ahmW+AWrVKaUox
 4IYrTHrANKgc3BUUChXYHSGEglnma2IVAjysD11AkqibeCqGKMWm8uzXR37jfEKL8MfBFwAe/wT69
 im95LpwDbY8BVA==;
Received: from [193.50.110.235] (port=48724 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 1o5lnq-0005Cp-9n; Mon, 27 Jun 2022 06:17:10 -0400
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Nonidi 9 Messidor an 230 de la =?UTF-8?Q?R=C3=A9volution,?= jour de l'Absinthe
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: Mon, 27 Jun 2022 12:17:08 +0200
In-Reply-To: <875ykpdsbd.fsf_-_@HIDDEN> (Chris Marusich's message of "Sat, 
 25 Jun 2022 02:07:50 -0700")
Message-ID: <87mtdyif6j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
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,

Chris Marusich <cmmarusich@HIDDEN> skribis:

> It turns out that it is probably not OK to rely on shell redirection in
> this case, after all.  For example, "dash does not support multi-digit
> file descriptors":
>
> https://bugs.launchpad.net/ubuntu/+source/dash/+bug/249620

Bah.  :-/

[...]

> To resolve this, I changed the code so that it just writes to a
> temporary file.  This is simple and more robust.  With the attached
> patch, I was able to use a command like the one above to verify that
> "guix environment --check" works correctly for Guix-built bash, dash,
> ksh, fish, zsh, and ash.  I also verified that it works for Fedora's
> /bin/sh and /bin/bash.
>
> What do you think of this file-based approach?  Supporting many
> different shells is pretty tricky, but I think this patch does a good
> enough job.

Like Maxime, I=E2=80=99d rather not create a temporary file.

I agree that Dash should be fixed, but in the meantime, we still want
our stuff to work with the broken Dash (it=E2=80=99s the default on
Debian/Ubuntu, isn=E2=80=99t it?).

I don=E2=80=99t have a better idea to offer though=E2=80=A6

Ludo=E2=80=99.




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Maxime Devos <maximedevos@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 27 Jun 2022 10:35:02 +0000
Resent-Message-ID: <handler.51466.B51466.165632606513104 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Chris Marusich <cmmarusich@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165632606513104
          (code B ref 51466); Mon, 27 Jun 2022 10:35:02 +0000
Received: (at 51466) by debbugs.gnu.org; 27 Jun 2022 10:34:25 +0000
Received: from localhost ([127.0.0.1]:49962 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5m4X-0003PD-9w
	for submit <at> debbugs.gnu.org; Mon, 27 Jun 2022 06:34:25 -0400
Received: from albert.telenet-ops.be ([195.130.137.90]:44374)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1o5m4V-0003Ow-6V
 for 51466 <at> debbugs.gnu.org; Mon, 27 Jun 2022 06:34:24 -0400
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by albert.telenet-ops.be with bizsmtp
 id oAaM2700C4UW6Th06AaMb1; Mon, 27 Jun 2022 12:34:21 +0200
Message-ID: <6e1506e91c5aa75ca366a61d65f7e461eebf9923.camel@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Date: Mon, 27 Jun 2022 12:34:21 +0200
In-Reply-To: <87mtdyif6j.fsf@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
 <87mtdyif6j.fsf@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-xot6cNNur6CSUkM+qRxr"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1656326061; bh=9E8swgr+vu9d2RFBwT62zgBI10j+ObgNNCPCI0NiEFA=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=NDZDV6TLcS6zjx5O9/yp81nzstrnvbNWFI4tn+vUgOg4hadyg4cJ7QQ/ykfsyn/0p
 +Pe31MRS+8u/tHElmDF/D3LakXfisJsUHHOUq9J7ZZ/GioqIu4BUBXRxopOvzTz6Mq
 B7NVqIXvNx3MckwL+NVRX46A8wYESU76ro76K5hGRAPjCBo/PdvoF6V4hCG4jPN8WQ
 1K6xOdzli4DoNtg8zMFOJdP1RvLtHQncdF2fOKGaF5NhvbluOQA2xKKzEt5Scj/s5B
 Hoy5GvDhvbUvAv/DDdfVci43Xqj2mYN7r+wELOQV3PhDUtdsf6nAad6J0N5hWVc9uD
 sIiPnQyTGiKZw==
X-Spam-Score: -0.0 (/)
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 (-)


--=-xot6cNNur6CSUkM+qRxr
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Ludovic Court=C3=A8s schreef op ma 27-06-2022 om 12:17 [+0200]:
> I agree that Dash should be fixed, but in the meantime, we still want
> our stuff to work with the broken Dash (it=E2=80=99s the default on
> Debian/Ubuntu, isn=E2=80=99t it?).

If Dash is fixed, then it's non-broken, and we don't have to work with
the broken Dash.  I don't expect fixing it to be more complicated than
the work-arounds in Guile.

> On 26 June 2022 13:07:11 UTC, Maxime Devos <maximedevos@HIDDEN>
> wrote:
> >(To be clear, I still recommend just fixing dash ...)
>=20
> That's the long-term solution, but Guix needs a work-around
> regardless.

Fixing dash seems to me something that could be done in the short term?

Greetings,
Maxime

--=-xot6cNNur6CSUkM+qRxr
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrmHrRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7srJAQDBxc6gxrtwdV3oqHrvYuNXcyUU
ybPn+SiL783JBBACYwEA/vgxXuWAr3LXik1J9CWTgIV3EHl9We0V/FXp+okeZA0=
=aiwo
-----END PGP SIGNATURE-----

--=-xot6cNNur6CSUkM+qRxr--





Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: bokr@HIDDEN
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 27 Jun 2022 11:24:02 +0000
Resent-Message-ID: <handler.51466.B51466.165632902128746 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, Chris Marusich <cmmarusich@HIDDEN>, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165632902128746
          (code B ref 51466); Mon, 27 Jun 2022 11:24:02 +0000
Received: (at 51466) by debbugs.gnu.org; 27 Jun 2022 11:23:41 +0000
Received: from localhost ([127.0.0.1]:50021 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5mqC-0007TY-H9
	for submit <at> debbugs.gnu.org; Mon, 27 Jun 2022 07:23:40 -0400
Received: from mailout.easymail.ca ([64.68.200.34]:51470)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bokr@HIDDEN>)
 id 1o5mq9-0007TG-BZ; Mon, 27 Jun 2022 07:23:39 -0400
Received: from localhost (localhost [127.0.0.1])
 by mailout.easymail.ca (Postfix) with ESMTP id C3322617F3;
 Mon, 27 Jun 2022 11:23:31 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1656329011; bh=2/ini8Wdnm0VslQRDrPAQUWaHw/7dmJFDaBlvZ0TiJI=;
 h=From:Date:To:Cc:Subject:References:In-Reply-To:From;
 b=NvemD664c1mOgVblYZygteeuJKA+pKSm6c5qh0Ohjtt91PPF6w5z5hrIAzcxzp78l
 wVj8XTiMrNffpmCQfz2iURp+HudXtjNv+se4qn4qxXEXF4DxleBYDS5Fb27jwJ8UDk
 UbFnDDfe6UsXuIpXa2jnNRkO8WGpkAftbZL/QPcrWW8FuO1vQX8FWbGm8eSB4d3OYf
 I9OQFyp007DLQiMiVvfgWy1yVD5FINCs2Uaz0F2FCFT4GaoRUeq6EC5C3WmvU0Wv0M
 61U7Ge39qewlTMc/SSuAwVQgPg+BrZGjG2w+a6mo5ZOlwHYd0EOOpJCUVGjvNJ2cAr
 uHb96xoqppnKg==
X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn
Received: from mailout.easymail.ca ([127.0.0.1])
 by localhost (emo07-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id w-HDYqF8gViy; Mon, 27 Jun 2022 11:23:31 +0000 (UTC)
Received: from localhost (m90-129-205-252.cust.tele2.se [90.129.205.252])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
 SHA256) (No client certificate requested)
 by mailout.easymail.ca (Postfix) with ESMTPSA id DAE0A61763;
 Mon, 27 Jun 2022 11:23:30 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1656329011; bh=2/ini8Wdnm0VslQRDrPAQUWaHw/7dmJFDaBlvZ0TiJI=;
 h=From:Date:To:Cc:Subject:References:In-Reply-To:From;
 b=NvemD664c1mOgVblYZygteeuJKA+pKSm6c5qh0Ohjtt91PPF6w5z5hrIAzcxzp78l
 wVj8XTiMrNffpmCQfz2iURp+HudXtjNv+se4qn4qxXEXF4DxleBYDS5Fb27jwJ8UDk
 UbFnDDfe6UsXuIpXa2jnNRkO8WGpkAftbZL/QPcrWW8FuO1vQX8FWbGm8eSB4d3OYf
 I9OQFyp007DLQiMiVvfgWy1yVD5FINCs2Uaz0F2FCFT4GaoRUeq6EC5C3WmvU0Wv0M
 61U7Ge39qewlTMc/SSuAwVQgPg+BrZGjG2w+a6mo5ZOlwHYd0EOOpJCUVGjvNJ2cAr
 uHb96xoqppnKg==
From: bokr@HIDDEN
Date: Mon, 27 Jun 2022 13:23:15 +0200
Message-ID: <20220627112315.GA7679@LionPure>
References: <87lez5td4n.fsf@HIDDEN> <87sftc4osu.fsf@HIDDEN>
 <87h79slysd.fsf@HIDDEN> <87sft13dyv.fsf@HIDDEN>
 <874k59d802.fsf@HIDDEN> <87wnhy2w73.fsf_-_@HIDDEN>
 <878rudzsmv.fsf@HIDDEN> <87sfozzglf.fsf_-_@HIDDEN>
 <875ykpdsbd.fsf_-_@HIDDEN> <87mtdyif6j.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87mtdyif6j.fsf@HIDDEN>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Spam-Score: -2.3 (--)
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 (---)

On +2022-06-27 12:17:08 +0200, Ludovic Courtès wrote:
> Hi Chris,
> 
> Chris Marusich <cmmarusich@HIDDEN> skribis:
> 
> > It turns out that it is probably not OK to rely on shell redirection in
> > this case, after all.  For example, "dash does not support multi-digit
> > file descriptors":
> >
> > https://bugs.launchpad.net/ubuntu/+source/dash/+bug/249620
> 
> Bah.  :-/
> 
> [...]
> 
> > To resolve this, I changed the code so that it just writes to a
> > temporary file.  This is simple and more robust.  With the attached
> > patch, I was able to use a command like the one above to verify that
> > "guix environment --check" works correctly for Guix-built bash, dash,
> > ksh, fish, zsh, and ash.  I also verified that it works for Fedora's
> > /bin/sh and /bin/bash.
> >
> > What do you think of this file-based approach?  Supporting many
> > different shells is pretty tricky, but I think this patch does a good
> > enough job.
> 
> Like Maxime, I’d rather not create a temporary file.
> 
> I agree that Dash should be fixed, but in the meantime, we still want
> our stuff to work with the broken Dash (it’s the default on
> Debian/Ubuntu, isn’t it?).
> 
> I don’t have a better idea to offer though…
> 
> Ludo’.
> 
> 
>
If this is all about capturing an environment as text,
how about

--8<---------------cut here---------------start------------->8---
xargs -0 < /proc/$$/environ
--8<---------------cut here---------------end--------------->8---

(not limited to $$ I would think)
--
Regards,
Bengt Richter




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Bengt Richter <bokr@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Mon, 27 Jun 2022 14:23:02 +0000
Resent-Message-ID: <handler.51466.B51466.165633977810644 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, Chris Marusich <cmmarusich@HIDDEN>, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165633977810644
          (code B ref 51466); Mon, 27 Jun 2022 14:23:02 +0000
Received: (at 51466) by debbugs.gnu.org; 27 Jun 2022 14:22:58 +0000
Received: from localhost ([127.0.0.1]:52952 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5pdi-0002lb-C7
	for submit <at> debbugs.gnu.org; Mon, 27 Jun 2022 10:22:58 -0400
Received: from mailout.easymail.ca ([64.68.200.34]:43380)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bokr@HIDDEN>)
 id 1o5pdg-0002lL-OK; Mon, 27 Jun 2022 10:22:57 -0400
Received: from localhost (localhost [127.0.0.1])
 by mailout.easymail.ca (Postfix) with ESMTP id 357A561982;
 Mon, 27 Jun 2022 14:22:51 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1656339771; bh=/DS8GQv1lVbNd+mwQyXBv50kfZT099/d5DhXerAEr7o=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=kPR1VE9/TnDQDzCC2Vc08GoVXzrmeYFDerzVIi6gc41CGodbZFpeIjtEmrhLZf9Vp
 3OVMAUIfdcWvJaZKXHjgHafBpKToFVyI5txfMtEcO8dJAWxfbkLCpVW3ufjQX1MAmy
 QDVWD+3f+LpRmoIdhSVuhVQbq8wZIJ3rlanoWOx/rm4IBM/zLaRlmNWUk7qjkgoRB+
 dj4eEFwEQ+KG0kg3zzkVCW5wlmbCfmNLNvPSZU439iRPNkR21IdfXSdEyTmBM0Zq18
 HQ6ZlQHzSdUU5tah9Nba9jlqYfw0mfDN2VuVKi1HKFmURcLlKsH4X1Azquvr0hdSF+
 2IHZeZJk1q6tQ==
X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn
Received: from mailout.easymail.ca ([127.0.0.1])
 by localhost (emo07-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id d6Ghaey34i0f; Mon, 27 Jun 2022 14:22:51 +0000 (UTC)
Received: from localhost (m90-129-205-252.cust.tele2.se [90.129.205.252])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
 SHA256) (No client certificate requested)
 by mailout.easymail.ca (Postfix) with ESMTPSA id 6361761884;
 Mon, 27 Jun 2022 14:22:50 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail;
 t=1656339770; bh=/DS8GQv1lVbNd+mwQyXBv50kfZT099/d5DhXerAEr7o=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=H3j3eatWlHvGQrebEtt3F89w6lE/T0kk4c/CXfJX0XdgcK2WUSUnV8blj9LDwwfyo
 C8baLyMG2Z7b/OlJC9xWFxeNBPp9Gs7q4MnIq0uVXIaQDnyrUFxUG9qMKQ0EYgnxbn
 kwe4tdvT4/qpwkAbUMWIF45qki5nuhF7ZowEmOHljJLn0euxzP1nv6dPIOE9exblbV
 FCj5E0jlyqw2Bx6Lwy7Fbn+8eiaDXfdEOrrhO96onulyZnI2BoykcL2mEuH5sbhtAq
 KBci3ES1jHuEk6g266coq4P3CSfOA5fO79XRgwEebfigRfiCh1axg/H1p/pMESNd1c
 INZPxwZ+gboYQ==
Date: Mon, 27 Jun 2022 16:22:32 +0200
From: Bengt Richter <bokr@HIDDEN>
Message-ID: <20220627142232.GA17131@LionPure>
References: <87sftc4osu.fsf@HIDDEN> <87h79slysd.fsf@HIDDEN>
 <87sft13dyv.fsf@HIDDEN> <874k59d802.fsf@HIDDEN>
 <87wnhy2w73.fsf_-_@HIDDEN> <878rudzsmv.fsf@HIDDEN>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
 <87mtdyif6j.fsf@HIDDEN> <20220627112315.GA7679@LionPure>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20220627112315.GA7679@LionPure>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Spam-Score: -2.3 (--)
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 (---)

On +2022-06-27 13:23:15 +0200, bokr@HIDDEN wrote:
> >
> If this is all about capturing an environment as text,
> how about
> 
> --8<---------------cut here---------------start------------->8---
> xargs -0 < /proc/$$/environ
> --8<---------------cut here---------------end--------------->8---
> 
> [...]
>
Actually, why fight shell stuff when guile can read it?
Or are these modules not available in your context?
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (use-modules (ice-9 textual-ports))
scheme@(guile-user)> (define ep (open-input-file "/proc/12430/environ"))
scheme@(guile-user)> (define es (get-string-all ep))
--8<---------------cut here---------------end--------------->8---
es from above got it all, when I tried manually as above.

FWIW I also did the same with (use-modules (rnrs bytevectors))
and the nulls show up as the expected zeroes.
--
Regards,
Bengt Richter




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 28 Jun 2022 07:46:02 +0000
Resent-Message-ID: <handler.51466.B51466.165640232813587 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Maxime Devos <maximedevos@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, Chris Marusich <cmmarusich@HIDDEN>, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165640232813587
          (code B ref 51466); Tue, 28 Jun 2022 07:46:02 +0000
Received: (at 51466) by debbugs.gnu.org; 28 Jun 2022 07:45:28 +0000
Received: from localhost ([127.0.0.1]:53871 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o65ua-0003X4-34
	for submit <at> debbugs.gnu.org; Tue, 28 Jun 2022 03:45:28 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54290)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1o65uY-0003Wl-Re; Tue, 28 Jun 2022 03:45:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53838)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1o65uQ-0006Ib-3s; Tue, 28 Jun 2022 03:45:21 -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=ZGRfejv8wlnMFX4HmIuHT9eizrXe29AfZJoVT2GgGyE=; b=YYyN2/N33vqqO2x26mvj
 NhSAH9PzT2+mv38Sf1hMY76bQIT6/YSxEVUPdl7UEvFSsWZuyT/RFodif9P50xy5tpW8pdy2vbKYw
 f5nlG3Uq9kLF0r+Xcikj5XVqn+MDlMx5P+Eq8oCenFJqmvCbQ8XMY70mUhz+XVS2Jc/a4At4EZpWH
 1ZFelER5RzEI/JtTzUBk1udC4+6iiapYRv6iUGYqbMTW97KYZKL9M8j7uo7nkfTRAiI+6yIX1Vyst
 oIF8i+hZLmDEr5s3rf1DcoxEZVGvqRP7ECNwwG4UzUQO2Z7zX+KAWQPF7Gec8XVDc8XHnCTSiTs//
 XHNQgDV/EAhPZg==;
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=43396 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 1o65uO-0003fL-2w; Tue, 28 Jun 2022 03:45:17 -0400
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
 <87mtdyif6j.fsf@HIDDEN>
 <6e1506e91c5aa75ca366a61d65f7e461eebf9923.camel@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: =?UTF-8?Q?D=C3=A9cadi?= 10 Messidor an 230 de la
 =?UTF-8?Q?R=C3=A9volution,?= jour de la Faucille
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, 28 Jun 2022 09:45:14 +0200
In-Reply-To: <6e1506e91c5aa75ca366a61d65f7e461eebf9923.camel@HIDDEN>
 (Maxime Devos's message of "Mon, 27 Jun 2022 12:34:21 +0200")
Message-ID: <877d51fcz9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
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 (---)

Maxime Devos <maximedevos@HIDDEN> skribis:

> Ludovic Court=C3=A8s schreef op ma 27-06-2022 om 12:17 [+0200]:
>> I agree that Dash should be fixed, but in the meantime, we still want
>> our stuff to work with the broken Dash (it=E2=80=99s the default on
>> Debian/Ubuntu, isn=E2=80=99t it?).
>
> If Dash is fixed, then it's non-broken

Even if a fix goes upstream today, people will still be using a distro
with the broken Dash for years, literally.  That=E2=80=99s why I think we h=
ave
to cope with it.

Ludo=E2=80=99.




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Maxime Devos <maximedevos@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 28 Jun 2022 10:39:02 +0000
Resent-Message-ID: <handler.51466.B51466.165641271530558 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, Chris Marusich <cmmarusich@HIDDEN>, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165641271530558
          (code B ref 51466); Tue, 28 Jun 2022 10:39:02 +0000
Received: (at 51466) by debbugs.gnu.org; 28 Jun 2022 10:38:35 +0000
Received: from localhost ([127.0.0.1]:54033 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o68c6-0007wn-Oy
	for submit <at> debbugs.gnu.org; Tue, 28 Jun 2022 06:38:35 -0400
Received: from andre.telenet-ops.be ([195.130.132.53]:60870)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1o68bw-0007wK-DJ
 for 51466 <at> debbugs.gnu.org; Tue, 28 Jun 2022 06:38:26 -0400
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by andre.telenet-ops.be with bizsmtp
 id oaeN270034UW6Th01aeN82; Tue, 28 Jun 2022 12:38:22 +0200
Message-ID: <c51705e5eeb98d0287296b71a80f92c0f8c33d1e.camel@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Date: Tue, 28 Jun 2022 12:38:15 +0200
In-Reply-To: <877d51fcz9.fsf@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
 <87mtdyif6j.fsf@HIDDEN>
 <6e1506e91c5aa75ca366a61d65f7e461eebf9923.camel@HIDDEN>
 <877d51fcz9.fsf@HIDDEN>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-+kpxCyyjpkIp2Qsc/JoY"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1656412703; bh=KI9RGxPmj4GN7NhKURDzu5iberHiT3ZoYOvT8Dp33dY=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=oK4CjH6Gkruh8pDxpm6qO7ITf7jpy+fGeb+GR+xLf3PEG8XOy//1zrud8+UINyCOB
 QI5C79Od37jYZM9BM880HqJgboSfc4Tl2d4yx0DoRhbliH/MvJvXmw82w9XBJUy9Zg
 9jpkKq7xYiqkoU5SJBVI8Gn54KlJiHRuQ3yEKHtAlMmWfLPuhvJlLPY9q95RhGrt2x
 E0mrwd4gxgWEZZ5RedI+aUi12IG3aOnGmrETJxfraJj+PIZj2ThR+Z8+ovvpnpSgM/
 +WmZ+QxY681Vrzz/7Y8G4aWOhdiMan8GaBdheUFZgC6Kw2C0a0DGAOjc89BCpKm8lF
 i7xA4IKtIvuIw==
X-Spam-Score: -0.0 (/)
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 (-)


--=-+kpxCyyjpkIp2Qsc/JoY
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Ludovic Court=C3=A8s schreef op di 28-06-2022 om 09:45 [+0200]:
> Maxime Devos <maximedevos@HIDDEN> skribis:
>=20
> > Ludovic Court=C3=A8s schreef op ma 27-06-2022 om 12:17 [+0200]:
> > > I agree that Dash should be fixed, but in the meantime, we still want
> > > our stuff to work with the broken Dash (it=E2=80=99s the default on
> > > Debian/Ubuntu, isn=E2=80=99t it?).
> >=20
> > If Dash is fixed, then it's non-broken
>=20
> Even if a fix goes upstream today, people will still be using a distro
> with the broken Dash for years, literally.=C2=A0 That=E2=80=99s why I thi=
nk we have
> to cope with it.

Then it could be fixed in that distro?  And if the distro intentionally
keeps it broken for years, then that seems more a problem in the distro
than Guix to me.

Greetings,
Maxime.

--=-+kpxCyyjpkIp2Qsc/JoY
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrraGBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7k4aAP9TLOzjPUNch0uIQnYszrUpUETF
qu719+XYCJh50eAkygEAkcL+44Gn5YwZIjwxXwHmXmsFi1icNlOvGVIQfrrjdg0=
=2gjF
-----END PGP SIGNATURE-----

--=-+kpxCyyjpkIp2Qsc/JoY--





Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: "(" <paren@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 28 Jun 2022 16:58:02 +0000
Resent-Message-ID: <handler.51466.B51466.165643546714635 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: "Maxime Devos" <maximedevos@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, Chris Marusich <cmmarusich@HIDDEN>, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165643546714635
          (code B ref 51466); Tue, 28 Jun 2022 16:58:02 +0000
Received: (at 51466) by debbugs.gnu.org; 28 Jun 2022 16:57:47 +0000
Received: from localhost ([127.0.0.1]:56208 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o6EX5-0003ny-CW
	for submit <at> debbugs.gnu.org; Tue, 28 Jun 2022 12:57:47 -0400
Received: from knopi.disroot.org ([178.21.23.139]:46758)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <paren@HIDDEN>)
 id 1o6EX1-0003nl-QW; Tue, 28 Jun 2022 12:57:45 -0400
Received: from localhost (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 5304D459B5;
 Tue, 28 Jun 2022 18:57:42 +0200 (CEST)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from knopi.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id hSL0UVrdB_dd; Tue, 28 Jun 2022 18:57:41 +0200 (CEST)
Mime-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1656435461; bh=32aghQvAEARkH4mfpTJhbFJngYrNHAAsQ8AICI/Zm1Y=;
 h=Date:Cc:Subject:From:To:References:In-Reply-To;
 b=NzQ/+dblurR7i7JerLdrcENIHEY68U5xbbaAJ0ecbw/0tR1fs3I/JY9dKzxxKQC8N
 fRTZ1hksNe5Y05CuCGO4T7RWGU1LEHQvwpfsdTxCESoZDhZu4D355adHo0nAQZBNw9
 4L44rSy6JrDjaF0tV5unD9zIVbKxUwxjKRmjT3MVnk1HYktbst91ch3nHBAJ22OEJf
 UtG6/cXQ0gVxppSWHKA58FI5kGXPohJZj513Z8+X0L39Ui9kGZjugL4UIhIwm2q6ai
 o7ze1JeRt2dI/QGHMtw6WXSLpFvhKfH+KipCC07e0SzsnS1cT2+J6ZW7LrDaWzeVK/
 +7r+VK2sIIIKw==
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
Date: Tue, 28 Jun 2022 17:57:40 +0100
Message-Id: <CL1XD5FVW8CY.3UBQYT248G4A8@guix-aspire>
From: "(" <paren@HIDDEN>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
 <87mtdyif6j.fsf@HIDDEN>
 <6e1506e91c5aa75ca366a61d65f7e461eebf9923.camel@HIDDEN>
 <877d51fcz9.fsf@HIDDEN>
 <c51705e5eeb98d0287296b71a80f92c0f8c33d1e.camel@HIDDEN>
In-Reply-To: <c51705e5eeb98d0287296b71a80f92c0f8c33d1e.camel@HIDDEN>
X-Spam-Score: -0.0 (/)
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 (-)

On Tue Jun 28, 2022 at 11:38 AM BST, Maxime Devos wrote:
> Then it could be fixed in that distro?  And if the distro intentionally
> keeps it broken for years, then that seems more a problem in the distro
> than Guix to me.

I believe Ludo' is referring to LTS distros and other situations where
somebody might not update for a long time.

    -- (




Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#51466: bug#53355: bug#51466: bug#53355: guix shell --check: confusing error message
Resent-From: Maxime Devos <maximedevos@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 28 Jun 2022 17:32:02 +0000
Resent-Message-ID: <handler.51466.B51466.165643748517798 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 51466
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: moreinfo
To: "(" <paren@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 53355 <at> debbugs.gnu.org, Chris Marusich <cmmarusich@HIDDEN>, 51466 <at> debbugs.gnu.org
Received: via spool by 51466-submit <at> debbugs.gnu.org id=B51466.165643748517798
          (code B ref 51466); Tue, 28 Jun 2022 17:32:02 +0000
Received: (at 51466) by debbugs.gnu.org; 28 Jun 2022 17:31:25 +0000
Received: from localhost ([127.0.0.1]:56240 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o6F3d-0004cy-FF
	for submit <at> debbugs.gnu.org; Tue, 28 Jun 2022 13:31:25 -0400
Received: from andre.telenet-ops.be ([195.130.132.53]:49194)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1o6F3b-0004cg-Bg
 for 51466 <at> debbugs.gnu.org; Tue, 28 Jun 2022 13:31:24 -0400
Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be
 ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a])
 by andre.telenet-ops.be with bizsmtp
 id ohXL2700m4UW6Th01hXMtT; Tue, 28 Jun 2022 19:31:21 +0200
Message-ID: <34951e5d5c9411ab311f3fd797618cd6e899311b.camel@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Date: Tue, 28 Jun 2022 19:31:16 +0200
In-Reply-To: <CL1XD5FVW8CY.3UBQYT248G4A8@guix-aspire>
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>
 <87sfozzglf.fsf_-_@HIDDEN> <875ykpdsbd.fsf_-_@HIDDEN>
 <87mtdyif6j.fsf@HIDDEN>
 <6e1506e91c5aa75ca366a61d65f7e461eebf9923.camel@HIDDEN>
 <877d51fcz9.fsf@HIDDEN>
 <c51705e5eeb98d0287296b71a80f92c0f8c33d1e.camel@HIDDEN>
 <CL1XD5FVW8CY.3UBQYT248G4A8@guix-aspire>
Content-Type: multipart/signed; micalg="pgp-sha512";
 protocol="application/pgp-signature"; boundary="=-Nl88xnx6xmuxf9enHv0Z"
User-Agent: Evolution 3.38.3-1 
MIME-Version: 1.0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1656437481; bh=NOosRwuo0TsQMkS4Wc6F8EO4X1lbRDk5DsralQYzN7k=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=fzThkKda6dE0mLnMyGRnP+LquXw0m3uQSr4OgRmPMj3aa5jhS2cNeVohFHsudVx98
 bTsaWVtfgYAp+w9C8S0+FA6qX5zTaDUENqA8+p08RsTFW6Xm2rS6/8v35QoK3y78IP
 0NdVv/7iu7Jz2Bnw5CxzWWQwQwp7Uc7onsMT1SPrEnyvdZ8Ys/z+nHZmRFwvmArD4o
 Zl4+Ne5ugJOXqcJsem519JYgecgIFmrxlKs3T9azkl7Sw+IoIwOOoT+TH28rz25YhT
 6Kz3AQcNH2wq4AV3zlBbp17eF4/zDJ7B7Z5bhGD8l6D2eb+AI3MNHSMCY/6P8YScKa
 9sTVD9Gng89qg==
X-Spam-Score: -0.0 (/)
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 (-)


--=-Nl88xnx6xmuxf9enHv0Z
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

( schreef op di 28-06-2022 om 17:57 [+0100]:
> On Tue Jun 28, 2022 at 11:38 AM BST, Maxime Devos wrote:
> > Then it could be fixed in that distro?  And if the distro intentionally
> > keeps it broken for years, then that seems more a problem in the distro
> > than Guix to me.
>=20
> I believe Ludo' is referring to LTS distros and other situations where
> somebody might not update for a long time.
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0-- (

I'm thinking so too, though I want to mention LTS is not just =E2=80=98don'=
t
update=E2=80=99 -- the third letter means =E2=80=98support=E2=80=99, which =
covers backporting
bug fixes, though I don't know if the distro would include dash > 9 fds
in this.

Greetings,
Maxime.

--=-Nl88xnx6xmuxf9enHv0Z
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrs65BccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kkhAP9K1Al6BW9M8pJsDjGQTT3rNiDA
rACpyQzbJGCO0bl6cAD/VHTELPiAzm+1zWPW+I56BVA09SPlCujGrb9VXo9CAQE=
=4v1A
-----END PGP SIGNATURE-----

--=-Nl88xnx6xmuxf9enHv0Z--






Last modified: Tue, 28 Jun 2022 17:45:02 UTC

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