From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: =?utf-8?B?4oCYc3Vkb+KAmQ==?= leaves PATH =?utf-8?Q?unchanged?= =?utf-8?Q?=E2=80=A6?= so what? Date: Sat, 19 Jan 2019 23:52:59 +0100 Message-ID: <8736poqmyc.fsf@gnu.org> References: <87y37jwp1p.fsf@gnu.org> <87h8e7h6yd.fsf@elephly.net> <87r2dbv4w0.fsf@gnu.org> <87zhryv3l5.fsf@roquette.mug.biscuolo.net> <87fttqfmnm.fsf@elephly.net> 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]:50985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkzUD-0002TO-Hx for guix-devel@gnu.org; Sat, 19 Jan 2019 17:53:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkzU8-0005Hy-Qw for guix-devel@gnu.org; Sat, 19 Jan 2019 17:53:09 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:34102) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gkzU8-0005Cs-KS for guix-devel@gnu.org; Sat, 19 Jan 2019 17:53:04 -0500 In-Reply-To: (Caleb Ristvedt's message of "Fri, 18 Jan 2019 08:06:04 +0000") 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: Caleb Ristvedt Cc: guix-devel@gnu.org Hey, Caleb Ristvedt skribis: > I'd just like to add that if a user has guix installed for root but only > really keeps their user's guix up to date (I imagine a fairly common > situation), they're in for a weird situation when using sudo: a > bleeding-edge guix will complain about being outdated, since sudo (even > with -E) sets $USER, which is used to determine which file's timestamp > should be used for deciding whether the installed guix is outdated. > Basically, your shiny new guix warns you that someone else's dirty old gu= ix > is old. True, that=E2=80=99s super weird! (Actually I think it=E2=80=99s $HOME, no= t $USER.) Currently the =E2=80=98xdg-directory=E2=80=99 procedure (and thus =E2=80=98= config-directory=E2=80=99, which by default gives ~/.config/guix) does this: (or (getenv variable) (and=3D> (or (getenv "HOME") (passwd:dir (getpwuid (getuid)))) (cut string-append <> suffix))) I think giving $HOME higher precedence than /etc/passwd is the =E2=80=9Crig= ht=E2=80=9D behavior (the behavior people expect from programs in general), but it=E2= =80=99s true that it=E2=80=99s confusing in this case. Thoughts? Ludo=E2=80=99.