unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* guix pull: error: symlink: File exists
@ 2020-01-18 21:11 Jimmy Thrasibule
  2020-01-19 18:54 ` Jimmy Thrasibule
  0 siblings, 1 reply; 4+ messages in thread
From: Jimmy Thrasibule @ 2020-01-18 21:11 UTC (permalink / raw)
  To: help-guix

Hi,

I'm working on an Alpine Docker image with the Guix package manager [1].
The container is building and can run Guix without the ``--privileged``
option.

The installation process is based on the documentation and the installation
script [2]. Everything is working fine however, when I run ``guix pull`` in
the generated image, I got the following error:


    Migrating profile generations to '/var/guix/profiles/per-user/root'...
    guix pull: error: symlink: File exists: "
/var/guix/profiles/per-user/root/current-guix"


This issue has already been discussed at [3] but the workaround to delete
all the links in the directory ``/var/guix/profiles/per-user/root`` is
causing some troubles:

1. If I want to ship a ready to use image and delete the links upfront,
``guix daemon`` will fail to start since ``/root/.config/guix/current`` is
broken.
2. Users of the image can delete the links themselves but this is not
really friendly.

So what is exactly causing this error and what would be a good option to
fix it?


[1] https://hub.docker.com/repository/docker/x237net/alpine-guix
[2] https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
[3] https://lists.gnu.org/archive/html/help-guix/2018-12/msg00098.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: guix pull: error: symlink: File exists
  2020-01-18 21:11 guix pull: error: symlink: File exists Jimmy Thrasibule
@ 2020-01-19 18:54 ` Jimmy Thrasibule
  2020-01-20  9:29   ` Jimmy Thrasibule
  0 siblings, 1 reply; 4+ messages in thread
From: Jimmy Thrasibule @ 2020-01-19 18:54 UTC (permalink / raw)
  To: help-guix

I tried some actions and here is what happening:


    # ls -l .config/guix/
    total 0
    lrwxrwxrwx    1 root     root            45 Jan 19 18:33 current ->
/var/guix/profiles/per-user/root/current-guix
    # guix pull
    Migrating profile generations to '/var/guix/profiles/default'...
    Updating channel 'guix' from Git repository at '
https://git.savannah.gnu.org/git/guix.git'...
    [...]


When ``.config/guix/current`` is pointing to
``/var/guix/profiles/per-user/root/current-guix``, the ``guix pull``
command will change the link to `` /var/guix/profiles/default`` or the
other way arround.

Calling ``guix pull`` again will fail:


    # ls -l .config/guix/
    total 0
    lrwxrwxrwx    1 root     root            39 Jan 19 18:37 current ->
/var/guix/profiles/default/current-guix
    # guix pull
    Migrating profile generations to '/var/guix/profiles/per-user/root'...
    guix pull: error: symlink: File exists:
"/var/guix/profiles/per-user/root/current-guix"


The workaround is to link back the profile to ``per-user/root`` and delete
``/var/guix/profiles/default/current-guix*``.

It is not clear why Guix is constantly swapping the profiles this way.

Le sam. 18 janv. 2020 à 22:11, Jimmy Thrasibule <jimmy.thrasibule@gmail.com>
a écrit :

> Hi,
>
> I'm working on an Alpine Docker image with the Guix package manager [1].
> The container is building and can run Guix without the ``--privileged``
> option.
>
> The installation process is based on the documentation and the
> installation script [2]. Everything is working fine however, when I run
> ``guix pull`` in the generated image, I got the following error:
>
>
>     Migrating profile generations to '/var/guix/profiles/per-user/root'...
>     guix pull: error: symlink: File exists: "
> /var/guix/profiles/per-user/root/current-guix"
>
>
> This issue has already been discussed at [3] but the workaround to delete
> all the links in the directory ``/var/guix/profiles/per-user/root`` is
> causing some troubles:
>
> 1. If I want to ship a ready to use image and delete the links upfront,
> ``guix daemon`` will fail to start since ``/root/.config/guix/current`` is
> broken.
> 2. Users of the image can delete the links themselves but this is not
> really friendly.
>
> So what is exactly causing this error and what would be a good option to
> fix it?
>
>
> [1] https://hub.docker.com/repository/docker/x237net/alpine-guix
> [2] https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
> [3] https://lists.gnu.org/archive/html/help-guix/2018-12/msg00098.html
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: guix pull: error: symlink: File exists
  2020-01-19 18:54 ` Jimmy Thrasibule
@ 2020-01-20  9:29   ` Jimmy Thrasibule
  2020-01-20 17:21     ` zimoun
  0 siblings, 1 reply; 4+ messages in thread
From: Jimmy Thrasibule @ 2020-01-20  9:29 UTC (permalink / raw)
  To: help-guix

OK, so following the discussion at https://issues.guix.info/issue/39195, my
container was missing the $USER environment variable so Guix was failing
back to the "default" profile. Once $USER is set to "root" my current user
in this context, Guix is not complaining about the profiles anymore.

Le dim. 19 janv. 2020 à 19:54, Jimmy Thrasibule <jimmy.thrasibule@gmail.com>
a écrit :

> I tried some actions and here is what happening:
>
>
>     # ls -l .config/guix/
>     total 0
>     lrwxrwxrwx    1 root     root            45 Jan 19 18:33 current ->
> /var/guix/profiles/per-user/root/current-guix
>     # guix pull
>     Migrating profile generations to '/var/guix/profiles/default'...
>     Updating channel 'guix' from Git repository at '
> https://git.savannah.gnu.org/git/guix.git'...
>     [...]
>
>
> When ``.config/guix/current`` is pointing to
> ``/var/guix/profiles/per-user/root/current-guix``, the ``guix pull``
> command will change the link to `` /var/guix/profiles/default`` or the
> other way arround.
>
> Calling ``guix pull`` again will fail:
>
>
>     # ls -l .config/guix/
>     total 0
>     lrwxrwxrwx    1 root     root            39 Jan 19 18:37 current ->
> /var/guix/profiles/default/current-guix
>     # guix pull
>     Migrating profile generations to '/var/guix/profiles/per-user/root'...
>     guix pull: error: symlink: File exists:
> "/var/guix/profiles/per-user/root/current-guix"
>
>
> The workaround is to link back the profile to ``per-user/root`` and delete
> ``/var/guix/profiles/default/current-guix*``.
>
> It is not clear why Guix is constantly swapping the profiles this way.
>
> Le sam. 18 janv. 2020 à 22:11, Jimmy Thrasibule <
> jimmy.thrasibule@gmail.com> a écrit :
>
>> Hi,
>>
>> I'm working on an Alpine Docker image with the Guix package manager [1].
>> The container is building and can run Guix without the ``--privileged``
>> option.
>>
>> The installation process is based on the documentation and the
>> installation script [2]. Everything is working fine however, when I run
>> ``guix pull`` in the generated image, I got the following error:
>>
>>
>>     Migrating profile generations to '/var/guix/profiles/per-user/root'...
>>     guix pull: error: symlink: File exists: "
>> /var/guix/profiles/per-user/root/current-guix"
>>
>>
>> This issue has already been discussed at [3] but the workaround to delete
>> all the links in the directory ``/var/guix/profiles/per-user/root`` is
>> causing some troubles:
>>
>> 1. If I want to ship a ready to use image and delete the links upfront,
>> ``guix daemon`` will fail to start since ``/root/.config/guix/current`` is
>> broken.
>> 2. Users of the image can delete the links themselves but this is not
>> really friendly.
>>
>> So what is exactly causing this error and what would be a good option to
>> fix it?
>>
>>
>> [1] https://hub.docker.com/repository/docker/x237net/alpine-guix
>> [2] https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
>> [3] https://lists.gnu.org/archive/html/help-guix/2018-12/msg00098.html
>>
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: guix pull: error: symlink: File exists
  2020-01-20  9:29   ` Jimmy Thrasibule
@ 2020-01-20 17:21     ` zimoun
  0 siblings, 0 replies; 4+ messages in thread
From: zimoun @ 2020-01-20 17:21 UTC (permalink / raw)
  To: jimmy; +Cc: help-guix

Hi Jimmy,

On Mon, 20 Jan 2020 at 10:30, Jimmy Thrasibule
<jimmy.thrasibule@gmail.com> wrote:

> OK, so following the discussion at https://issues.guix.info/issue/39195, my
> container was missing the $USER environment variable so Guix was failing
> back to the "default" profile. Once $USER is set to "root" my current user
> in this context, Guix is not complaining about the profiles anymore.

I think it is solved now. I guess.
At least, the issue had been discussed in this thread [1] and fixed by
c20ba18304ee63f01895f092bb51bc2a9ce3303b.

You installed from v1.0.1, that's why. Sorry for the inconvenience.
Hope that the binary install will be updated soon using the fix. :-)

All the best,
simon

[1] https://lists.gnu.org/archive/html/guix-devel/2019-11/msg00540.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-20 17:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-18 21:11 guix pull: error: symlink: File exists Jimmy Thrasibule
2020-01-19 18:54 ` Jimmy Thrasibule
2020-01-20  9:29   ` Jimmy Thrasibule
2020-01-20 17:21     ` zimoun

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