all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: YOANN P <yoann_mac_donald@hotmail.com>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: guix gc doesn't seem to clean old guix revision
Date: Mon, 2 Dec 2019 22:51:32 +0100	[thread overview]
Message-ID: <CAJ3okZ0r8FcY0G=w4Zp=gSOiNg+fkKOomkPEQMt2Dr0X7Wk42w@mail.gmail.com> (raw)
In-Reply-To: <VI1P18901MB00290D2264F82E8EB2ED51DADB430@VI1P18901MB0029.EURP189.PROD.OUTLOOK.COM>

Hi,

On Mon, 2 Dec 2019 at 21:55, YOANN P <yoann_mac_donald@hotmail.com> wrote:

> > I do not understand: running without any $USER is kind of very special
> > edge case.
>
> It is not special at all, $USER is only set when using a login shell.
> So if you script some guix commands (who doesn't use a login shell),
> it broke as it broke with my tests.

You have right about $USER. But it is not so common because the case
has not been encountered too much already. ;-)


> There is a user, this is just that the shell used is not a login shell.
> Since $USER/$HOME are only set when using a login shell, it is
> better to use `whoami` in place of $USER and expand ~$(whoami)
> in place of $HOME in scripts to be sure to have the right values even
> when using a non-login shell or to avoid errors if $USER was override.

You are proposing to avoid the call to '(or (getenv "USER") (getenv
"LOGNAME"))' in guix/profiles.scm and guix/store.scm and instead to
rely on the command "whoami" from the coreutils package, right?
Other said, instead of falling in the "default" case in
%profile-directory, call the whoami command, right?

Is whoami exposed in Guile?


Thank you for the explanations.

All the best,
simon

  reply	other threads:[~2019-12-02 21:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 12:33 guix gc doesn't seem to clean old guix revision YOANN P
2019-11-20 12:00 ` YOANN P
2019-11-20 15:43   ` Julien Lepiller
2019-11-20 15:47   ` John Soo
2019-11-20 16:09     ` YOANN P
2019-11-23 17:43   ` Ludovic Courtès
2019-11-24 18:07     ` YOANN P
2019-11-26 19:26       ` zimoun
2019-11-27 14:21         ` zimoun
2019-11-29 15:14           ` YOANN P
2019-12-02 15:44             ` zimoun
2019-12-02 20:55               ` YOANN P
2019-12-02 21:51                 ` zimoun [this message]
2019-12-10 16:19             ` Ludovic Courtès
2019-12-10 16:32               ` zimoun
2019-12-11 11:13               ` YOANN P
2019-12-19 16:14                 ` Ludovic Courtès
2019-11-21 11:31 ` zimoun
2019-11-21 21:12   ` YOANN P

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ3okZ0r8FcY0G=w4Zp=gSOiNg+fkKOomkPEQMt2Dr0X7Wk42w@mail.gmail.com' \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=yoann_mac_donald@hotmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.