From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wMCXLd9K72HVMwAAgWs5BA (envelope-from ) for ; Tue, 25 Jan 2022 01:57:03 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yIzpKt9K72GKagAA9RJhRA (envelope-from ) for ; Tue, 25 Jan 2022 01:57:03 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 306C92202E for ; Tue, 25 Jan 2022 01:57:03 +0100 (CET) Received: from localhost ([::1]:54124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCA8r-00062d-Vw for larch@yhetil.org; Mon, 24 Jan 2022 19:57:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCA7u-000618-Ra for bug-guix@gnu.org; Mon, 24 Jan 2022 19:56:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53482) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nCA7u-0004rI-HU for bug-guix@gnu.org; Mon, 24 Jan 2022 19:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nCA7u-0004gj-Az for bug-guix@gnu.org; Mon, 24 Jan 2022 19:56:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#53355: guix shell --check: confusing error message Resent-From: Chris Marusich Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 25 Jan 2022 00:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53355 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 53355-submit@debbugs.gnu.org id=B53355.164307212817977 (code B ref 53355); Tue, 25 Jan 2022 00:56:02 +0000 Received: (at 53355) by debbugs.gnu.org; 25 Jan 2022 00:55:28 +0000 Received: from localhost ([127.0.0.1]:46385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCA7M-0004ft-3a for submit@debbugs.gnu.org; Mon, 24 Jan 2022 19:55:28 -0500 Received: from mail-pj1-f51.google.com ([209.85.216.51]:45969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nCA7I-0004fc-U7 for 53355@debbugs.gnu.org; Mon, 24 Jan 2022 19:55:26 -0500 Received: by mail-pj1-f51.google.com with SMTP id g9-20020a17090a67c900b001b4f1d71e4fso961085pjm.4 for <53355@debbugs.gnu.org>; Mon, 24 Jan 2022 16:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=kBgnGXJa0g99/TSVkZtiLw734rVKgTXx8d+VWXaWCzw=; b=dO1Hzgv6rXxjzQzJ6EXSwxgPo7PnxBHxJCoGE8rDvHnz1yBiVLFxQ3fT5eVTLUo6+g NnYSbEIPWKM4/kVGEkYAljGrXvpAtrrlzzFkIXzwFu8FboGmRphcmbN/7RW27vW6mRAm d78AAkJAj9VpvEOXktswotM1rnCB3KXrPG7hlmuVrnif8JuRj9EKWjnjOXb3YwSOTQHY exf7OOS0kP6F3W9n8pfAkqqiBTy11+dHHl2ijsd0xv8XVJT2jWTYwQSv8z4YLtpwaX5R zPzcGVaYsfxkbJcsryqbkfs9zwXvqaBumTAyqscjBmwMMmLcX7MPiIi/zZWRd6eIagHM fC5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=kBgnGXJa0g99/TSVkZtiLw734rVKgTXx8d+VWXaWCzw=; b=oRBkW7rq8rCFjv8RSI8gY1714VtQcENBHCNKeLsBnAiDyaIIlHNI3Tg7M3bLXbp2s1 ywF6xLiVDM3hd35kMHMqRN6Ob3EBGsZFqXjXWbft10gTLUXJJ7BERKkgfmfooiHOR6QU 4B5AIH9QDB0DxV1Zd4tKbzRHI+P/dgof+XZU2FURJTDn/OJDDQUuQGW7IN0VZ0WQ549F e8FZwnJFkpr1zdSe1cxJOX5Lhr8YWa4KS05pQKIWMjpZiJE5VboYki8i4b5LY0iu9zg4 CufOZoP09PhLh4JBj7XN5MJn5BllKD1PBunTiv9fgu8f5jAg9neWtetWwOT0gwJjy01k Sb/g== X-Gm-Message-State: AOAM53232IR5lJ23q11wCQDIcVtYlIOILuGgPuYriHhOOmBthxo4VMGc TbLsIDRsMr1TZtkFf2NPs8+H7X8tFVA= X-Google-Smtp-Source: ABdhPJyeH89yEPZM77obDvD8zqEz/NkWu8RdiWLZH6Ts9aAtrtmdmIW8y4t6JL0t/taYRmQe+qQNKg== X-Received: by 2002:a17:90b:4b83:: with SMTP id lr3mr959958pjb.42.1643072118426; Mon, 24 Jan 2022 16:55:18 -0800 (PST) Received: from garuda-lan (c-71-231-157-28.hsd1.wa.comcast.net. [71.231.157.28]) by smtp.gmail.com with ESMTPSA id h10sm17614201pfc.103.2022.01.24.16.55.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 16:55:17 -0800 (PST) From: Chris Marusich References: <87h7a08kub.fsf@gmail.com> <87lez5td4n.fsf@gnu.org> Date: Mon, 24 Jan 2022 16:55:13 -0800 In-Reply-To: <87lez5td4n.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 24 Jan 2022 15:35:52 +0100") Message-ID: <87sftc4osu.fsf@gmail.com> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 53355@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643072223; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=kBgnGXJa0g99/TSVkZtiLw734rVKgTXx8d+VWXaWCzw=; b=s3o6TfvQo/FGqjMmROk9HqaRNImVst9/I7Qgi6C5OtyH08Oc/43bwkwOXBOLypnC56XH26 hu34XFoWjoJrXxoqtTyT17Aq1gEOZsR4570CEL3/avyNfOKIAdsr/qtZpsxdXQWOt1V+6K YITfy7E4Snk06IqHqaRItKbT+BnD1/4q8BqWqj6SygfntPKu3/M2HUj8xlnu8YdcioywwN N/GU0vJNb9+UZLVTyqVQuWAzMrnQ+7NCbRqSrJHgkYVJck3zbqD0/kRhWzrYPQBd8P9TcC cJHXlsgAiSvMAQYKoxeVoOJbwNferXwk7noSDBtHImi7FmpvSofjI3qhx7QMNQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643072223; a=rsa-sha256; cv=none; b=bZOjrf+HBVXHvDK+ajfSnHQIKi3FTbYP6LisNoJ0yLO75fJ6V0Mpp2w1T3yESKwht77RxS lG6wtmBZN/tlz5yg1jRagcOlf/7OaPwfj8PDmUqT6oCNuV4Ns4qukJih3Cl3p05ul6OVL2 8d/fr+pwEVc7vujwmRJ9s8KbfT4XWYV1c5vrf1nv9vFhxkU31PwdVb2vSMdZufy/UpR8RS EtW0vJu4mgi2rw2it7GOaYuzF3AVKofc2Dul0TZiYNU8pus0T9HCgUso+4WBtHsCWaIQO/ ourZe6eRpKgYDW/0Y76WCqQwdsHJDLCX4hCJB79Y+6CYQTHRndQWC5JX2G3OOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dO1Hzgv6; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.13 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dO1Hzgv6; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 306C92202E X-Spam-Score: -4.13 X-Migadu-Scanner: scn1.migadu.com X-TUID: uL/PoG5Vctiq --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, Thank you for the response! Ludovic Court=C3=A8s writes: > What=E2=80=99s confusing is that =E2=80=98--check=E2=80=99 does the same = job whether or not > =E2=80=98--container=E2=80=99 is passed: it checks the behavior of your s= hell *outside* > a container. > > I think =E2=80=98--check=E2=80=99 should just do nothing when =E2=80=98--= container=E2=80=99 is used, > possibly emitting a warning saying it=E2=80=99s not doing anything (patch > below). > > Now, the diagnostic is hopefully correct if you use, say, =E2=80=98--pure= =E2=80=99 > instead of =E2=80=98--container=E2=80=99. Could you check whether this i= s the case? That sounds reasonable. I tested your patch. It now correctly emits a warning when both --container and --check are provided. However, I now see that the issue occurs even when --container is omitted. So it seems like something else might be going on. Below, I'll provide details of what I did to test your patch. In one test, I committed your change locally and did "guix pull" to install the patched Guix into ~/tmpguixprofile. I then tried using it: =2D-8<---------------cut here---------------start------------->8--- [0] marusich@suzaku:~/guix-master $ env -i bash [0] marusich@suzaku:/home/marusich/guix-master $ activate-profile ~/tmpguixprofile [0] marusich@suzaku:/home/marusich/guix-master $ which guix /home/marusich/tmpguixprofile/bin/guix =2D-8<---------------cut here---------------end--------------->8--- First, I tried without --pure or --container. Below, you can see that it claims LIBRARY_PATH is missing, but it does not seem to be missing: =2D-8<---------------cut here---------------start------------->8--- [0] marusich@suzaku:/home/marusich/guix-master $ guix shell --check -D guix guix shell: checking the environment variables visible from shell '/bin/sh'= ... guix shell: warning: variable 'LIBRARY_PATH' is missing from shell environm= ent hint: One or more environment variables have a different value in the shell= than the one we set. This means that you may find yourself running code in an environment different from the one you asked Guix to prepare. This usually indicates that your shell startup files are unexpectedly modifying those environment variables. For example, if you are using Bash, make sure that environment variables are set or modified in `~/.bash_profile' and _not_ in `~/.bashrc'. For more information on Bash startup files, run: info "(bash) Bash Startup Files" Alternatively, you can avoid the problem by passing the `--container' or `-C' option. That will give you a fully isolated environment running in a "container", immune to the issue described above. [1] marusich@suzaku:/home/marusich/guix-master $ env | grep LIBRARY_PATH [1] marusich@suzaku:/home/marusich/guix-master $ guix shell -D guix [0] \u@\H:\w\n$ env | grep LIBRARY_PATH LIBRARY_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib =2D-8<---------------cut here---------------end--------------->8--- Next, I tried with --container - you can see it works as intended: =2D-8<---------------cut here---------------start------------->8--- [0] marusich@suzaku:/home/marusich/guix-master $ guix shell --container --check -D guix guix shell: warning: '--check' is unnecessary when using '--container'; doi= ng nothing =2D-8<---------------cut here---------------end--------------->8--- Next, I tried with --pure and --check - once again, it claims LIBRARY_PATH is missing, even though it does not seem to be missing: =2D-8<---------------cut here---------------start------------->8--- [0] marusich@suzaku:/home/marusich/guix-master $ guix shell --pure --check -D guix guix shell: checking the environment variables visible from shell '/bin/sh'= ... guix shell: warning: variable 'LIBRARY_PATH' is missing from shell environm= ent hint: One or more environment variables have a different value in the shell= than the one we set. This means that you may find yourself running code in an environment different from the one you asked Guix to prepare. This usually indicates that your shell startup files are unexpectedly modifying those environment variables. For example, if you are using Bash, make sure that environment variables are set or modified in `~/.bash_profile' and _not_ in `~/.bashrc'. For more information on Bash startup files, run: info "(bash) Bash Startup Files" Alternatively, you can avoid the problem by passing the `--container' or `-C' option. That will give you a fully isolated environment running in a "container", immune to the issue described above. [1] marusich@suzaku:/home/marusich/guix-master $ env | grep LIBRARY_PATH [1] marusich@suzaku:/home/marusich/guix-master $ guix shell --pure -D guix $ env | grep LIBRARY_PATH LIBRARY_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib =2D-8<---------------cut here---------------end--------------->8--- A similar error message occurs if I try the same steps from a checkout using pre-inst-env. However, in that case the offending environment variable is different (PKG_CONFIG_PATH in this case): =2D-8<---------------cut here---------------start------------->8--- [0] marusich@suzaku:~/guix-master $ guix environment guix [0] [env] marusich@suzaku:~/guix-master $ ./pre-inst-env guix shell --check -D guix -- bash -c 'echo in env, PKG_CO= NFIG_PATH=3D"$PKG_CONFIG_PATH"' guix shell: checking the environment variables visible from shell '/bin/bas= h'... guix shell: warning: variable 'PKG_CONFIG_PATH' is missing from shell envir= onment hint: One or more environment variables have a different value in the shell= than the one we set. This means that you may find yourself running code in an environment different from the one you asked Guix to prepare. This usually indicates that your shell startup files are unexpectedly modifying those environment variables. For example, if you are using Bash, make sure that environment variables are set or modified in `~/.bash_profile' and _not_ in `~/.bashrc'. For more information on Bash startup files, run: info "(bash) Bash Startup Files" Alternatively, you can avoid the problem by passing the `--container' or `-C' option. That will give you a fully isolated environment running in a "container", immune to the issue described above. [1] [env] marusich@suzaku:~/guix-master $ ./pre-inst-env guix shell --check --pure -D guix -- bash -c 'echo in env,= PKG_CONFIG_PATH=3D"$PKG_CONFIG_PATH"' guix shell: checking the environment variables visible from shell '/bin/bas= h'... guix shell: warning: variable 'PKG_CONFIG_PATH' is missing from shell envir= onment hint: One or more environment variables have a different value in the shell= than the one we set. This means that you may find yourself running code in an environment different from the one you asked Guix to prepare. This usually indicates that your shell startup files are unexpectedly modifying those environment variables. For example, if you are using Bash, make sure that environment variables are set or modified in `~/.bash_profile' and _not_ in `~/.bashrc'. For more information on Bash startup files, run: info "(bash) Bash Startup Files" Alternatively, you can avoid the problem by passing the `--container' or `-C' option. That will give you a fully isolated environment running in a "container", immune to the issue described above. [1] [env] marusich@suzaku:~/guix-master $ ./pre-inst-env guix shell --check --container -D guix -- bash -c 'echo in= env, PKG_CONFIG_PATH=3D"$PKG_CONFIG_PATH"' guix shell: warning: '--check' is unnecessary when using '--container'; doi= ng nothing in env, PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi= le/lib/pkgconfig [0] [env] marusich@suzaku:~/guix-master $ ./pre-inst-env guix shell -D guix -- bash -c 'echo in env, PKG_CONFIG_PAT= H=3D"$PKG_CONFIG_PATH"' in env, PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi= le/lib/pkgconfig:/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profile/lib/pk= gconfig [0] [env] marusich@suzaku:~/guix-master $ ./pre-inst-env guix shell --pure -D guix -- bash -c 'echo in env, PKG_CON= FIG_PATH=3D"$PKG_CONFIG_PATH"' in env, PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi= le/lib/pkgconfig [0] [env] marusich@suzaku:~/guix-master $ ./pre-inst-env guix shell --container -D guix -- bash -c 'echo in env, PK= G_CONFIG_PATH=3D"$PKG_CONFIG_PATH"' in env, PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-profi= le/lib/pkgconfig [0] [env] marusich@suzaku:~/guix-master $ echo out of env, PKG_CONFIG_PATH=3D"$PKG_CONFIG_PATH" out of env, PKG_CONFIG_PATH=3D/gnu/store/hvcq6yjfjjc7060pq09zm1rj02mivg4h-p= rofile/lib/pkgconfig [0] [env] marusich@suzaku:~/guix-master $ =2D-8<---------------cut here---------------end--------------->8--- It seems this issue happens regardless of whether I use pre-inst-env or run Guix from a "guix pull" installation. =2D-=20 Chris PGP: https://savannah.gnu.org/people/viewgpg.php?user_id=3D106836 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmHvSnEVHGNtbWFydXNp Y2hAZ21haWwuY29tAAoJEN1AmhXYIkad4AQP/1qZY+j1OLqPK4vjC1ij47bnArpM JlXENik81qBkJZmpPiH3O24xylMoUJ/zQOwdLwnBL8pdpkt2Y+4NzwuLwKUqKoOf djbeWuD0UwdWHC9ICi489mOb51YlZT5lTp98tqrbjuiqAEo72OtcFr9LpV4wQk6n WJ35q0wbhyom73uwCGKNj08+bwaM+74Jt5Y0V/k+RlppEF7QP9wzK6JWWFYKsNQw nlKuwAOZGYfPSXOJGMy8Rtgiqc//UEQaho3qdW1ZdLM+XmL9iydHfwVTGUf2QVVT RSf9Os1lTp+XxjPtsa3Q4uwTTRKSkpwNLsMDqVOoDnBtjNSqayIkVtfkMKD9uMKu 6k+1+y0dPUK04yIxVuPryZ1H4qStaU+Fd0V174s5gDEt5ujGaTUgMLc/Om/HBSdw nTD8WKQX0cFZaOUCUZpfRYFUlJdXS4QloaHErg2T5Nl0InVk3SpkPsHf7e2hO/tK Hmc5nr0XrHz7G9Wz44Y1GGjeVcsyWFejh1kR+n8WBvF4TW4+ohdrFsWxe0NCyNCl BlG2juHRV+INYy8MlItge4FInY/an4XcdaXEwWjMOb8+Md+K2gxCdDAewhMQP8pb XES4PyifT/ncCcfQ3BHox3PpuT8MVlL/0/zUaBgjR2xTCcQQIetJn9D+EHa8rhQv rrGPp0GLc3mueS6R =wlPY -----END PGP SIGNATURE----- --=-=-=--