From: "Ludovic Courtès" <ludo@gnu.org>
To: Caleb Ristvedt <caleb.ristvedt@cune.org>
Cc: guix-devel@gnu.org
Subject: Re: ‘sudo’ leaves PATH unchanged… so what?
Date: Sat, 19 Jan 2019 23:52:59 +0100 [thread overview]
Message-ID: <8736poqmyc.fsf@gnu.org> (raw)
In-Reply-To: <CAELvotyu=jbnLwqdj7SewFSDFdu75PmksiunX2S0uk46OMWEjA@mail.gmail.com> (Caleb Ristvedt's message of "Fri, 18 Jan 2019 08:06:04 +0000")
Hey,
Caleb Ristvedt <caleb.ristvedt@cune.org> 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 guix
> is old.
True, that’s super weird! (Actually I think it’s $HOME, not $USER.)
Currently the ‘xdg-directory’ procedure (and thus ‘config-directory’,
which by default gives ~/.config/guix) does this:
(or (getenv variable)
(and=> (or (getenv "HOME")
(passwd:dir (getpwuid (getuid))))
(cut string-append <> suffix)))
I think giving $HOME higher precedence than /etc/passwd is the “right”
behavior (the behavior people expect from programs in general), but it’s
true that it’s confusing in this case.
Thoughts?
Ludo’.
next prev parent reply other threads:[~2019-01-19 22:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 10:34 ‘sudo’ leaves PATH unchanged… so what? Ludovic Courtès
2019-01-17 11:03 ` Pierre Neidhardt
2019-01-17 11:14 ` Ricardo Wurmus
2019-01-17 12:35 ` Ludovic Courtès
2019-01-17 12:47 ` Pierre Neidhardt
2019-01-18 7:15 ` Giovanni Biscuolo
2019-01-18 7:30 ` Ricardo Wurmus
2019-01-18 8:06 ` Caleb Ristvedt
2019-01-18 11:33 ` Giovanni Biscuolo
2019-01-18 19:03 ` Caleb Ristvedt
2019-01-18 20:29 ` Danny Milosavljevic
2019-01-19 6:19 ` swedebugia
2019-01-19 22:55 ` Ludovic Courtès
2019-01-19 22:52 ` Ludovic Courtès [this message]
2019-01-20 2:12 ` Danny Milosavljevic
2019-01-18 10:39 ` Giovanni Biscuolo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8736poqmyc.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=caleb.ristvedt@cune.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).