From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jimmy Thrasibule Subject: Re: guix pull: error: symlink: File exists Date: Mon, 20 Jan 2020 10:29:36 +0100 Message-ID: References: Reply-To: jimmy@thrasibule.mx Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:56834) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itTNZ-0003lE-5l for help-guix@gnu.org; Mon, 20 Jan 2020 04:29:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itTNV-0002dp-IA for help-guix@gnu.org; Mon, 20 Jan 2020 04:29:53 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:32822) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1itTNV-0002cy-BR for help-guix@gnu.org; Mon, 20 Jan 2020 04:29:49 -0500 Received: by mail-wm1-x334.google.com with SMTP id d139so14313848wmd.0 for ; Mon, 20 Jan 2020 01:29:48 -0800 (PST) In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org 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 =C3=A0 19:54, Jimmy Thrasibule a =C3=A9crit : > 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 delet= e > ``/var/guix/profiles/default/current-guix*``. > > It is not clear why Guix is constantly swapping the profiles this way. > > Le sam. 18 janv. 2020 =C3=A0 22:11, Jimmy Thrasibule < > jimmy.thrasibule@gmail.com> a =C3=A9crit : > >> 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 delet= e >> 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 >> >>