From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: =?utf-8?B?4oCYc3Vkb+KAmQ==?= leaves PATH =?utf-8?Q?unchanged?= =?utf-8?Q?=E2=80=A6?= so what? Date: Thu, 17 Jan 2019 11:34:26 +0100 Message-ID: <87y37jwp1p.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:41127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gk59U-0007n5-Ty for guix-devel@gnu.org; Thu, 17 Jan 2019 05:44:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gk50N-00034w-O4 for guix-devel@gnu.org; Thu, 17 Jan 2019 05:34:38 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:57420) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gk50L-0002vE-Ti for guix-devel@gnu.org; Thu, 17 Jan 2019 05:34:34 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 58B0E1652 for ; Thu, 17 Jan 2019 11:34:27 +0100 (CET) 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 kACcLKIJ5CNt for ; Thu, 17 Jan 2019 11:34:26 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id B19851159 for ; Thu, 17 Jan 2019 11:34:26 +0100 (CET) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Hello Guix, I=E2=80=99m not sure if this is a bug, but on Guix System, =E2=80=98sudo=E2= =80=99 leaves PATH unchanged: --8<---------------cut here---------------start------------->8--- $ sudo env|grep '^PATH=3D'|sha1sum 5236ce49c388ade7c3e8f767d8136c1c38a97c6a - $ env|grep '^PATH=3D'|sha1sum 5236ce49c388ade7c3e8f767d8136c1c38a97c6a - --8<---------------cut here---------------end--------------->8--- I think that=E2=80=99s because the shell spawned by =E2=80=98sudo=E2=80=99 = is not a login shell, so ~root/.bash_profile and other files that define/modify environment variables are not sourced. So I think this is expected behavior. However, it trips up many people. In particular, people are surprised that =E2=80=9Csudo guix system reconfigure =E2=80=A6=E2=80=9D does not use = ~root/.config/guix, and instead uses theirs (or /run/current-system/profile/=E2=80=A6). My take on this is that this is normal behavior, but that we should maybe recommend =E2=80=9Csudo -i guix system reconfigure =E2=80=A6=E2=80=9D= instead of =E2=80=9Csudo guix system reconfigure=E2=80=9D in the manual, and/or add a = warning in the manual. Thoughts? Ludo=E2=80=99.