all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: YOANN P <yoann_mac_donald@hotmail.com>
To: zimoun <zimon.toutoune@gmail.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 20:55:08 +0000	[thread overview]
Message-ID: <VI1P18901MB00290D2264F82E8EB2ED51DADB430@VI1P18901MB0029.EURP189.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAJ3okZ3-kT3FoM77CL0ZFqfMvT6vABUYUsAjHX+pnHprwpB7NQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2843 bytes --]

> > > As said, it is not a bug of "guix pull" but a bug of the
> > > configuration. Adding the root user to your Dockerfile should fix the
> > > issue you encounter.
> >
> > The fact that guix require $USER to be set is IMO a kind of bug and is
> > documented anywhere.

> 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.

> In your configuration file [1], you create everything with the
> (non-existent) root user and you are doing as they exists, i.e, ENV
> PATH, "ln -s", etc. then "guix pull" and because there is no user,
> Guix creates the default profile.
> I do not see where there is a bug. Guix does not break and it is a
> misconfiguration.
> IMO, the bug comes from your configuration file. The fix is: create an
> user or correctly symlink the profile
> (/var/guix/profiles/default/current-guix instead of
> /var/guix/profiles/per-user/root/current-guix).

The user already exists, the only problem I had was that my commands
was running with a non-login login shell, so $USER was not set and had to force the
set of $USER in a wrapper to allow guix to works without linux shell.

> However, I totally agree with you that it lacks documentation about
> this user case. Where do you suggest to add such information? A
> warning note in the binary installation section [2]? Something else?

It is not an installation problem but a usage problem, so every commands
who need $USER/$HOME should have a warning about the need to have
those variables set.

> [1] https://raw.githubusercontent.com/rockandska/.dotfiles/084b3c6924eeb985cb40edfc90e3827b10ba61e2/.local/opt/dotfiles-bootstrap/tests/Dockerfiles/Dockerfile
> [2] https://guix.gnu.org/manual/en/html_node/Binary-Installation.html#Binary-Installation


> > It will be less prone to errors to relay for $USER on something like
> > `whoami` and for $HOME expanding `~$USER`.

> What do you mean?
> If there is no user, then there is no user. :-)

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.

https://groups.google.com/forum/#!topic/comp.unix.shell/PLZPzNx3F_4

> > So, not sure if it is normal, but it seems there is an overhead of 166Mo
> > between the binary version and after doing 'guix pull' and 'guix gc'.

> Interesting. It should deserve more investigation why. :-)


> All the best,
> simon

Regards

[-- Attachment #2: Type: text/html, Size: 4861 bytes --]

  reply	other threads:[~2019-12-02 20:55 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 [this message]
2019-12-02 21:51                 ` zimoun
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=VI1P18901MB00290D2264F82E8EB2ED51DADB430@VI1P18901MB0029.EURP189.PROD.OUTLOOK.COM \
    --to=yoann_mac_donald@hotmail.com \
    --cc=guix-devel@gnu.org \
    --cc=zimon.toutoune@gmail.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.