From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jimmy Thrasibule Subject: bug#39195: guix pull switching between profiles/per-user and profiles/default Date: Sun, 19 Jan 2020 20:22:58 +0100 Message-ID: Reply-To: jimmy@thrasibule.mx Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d54581059c831a0d" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37455) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itGFs-0003Pl-9U for bug-guix@gnu.org; Sun, 19 Jan 2020 14:29:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itGFq-00033F-VH for bug-guix@gnu.org; Sun, 19 Jan 2020 14:29:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37941) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1itGFq-00033A-Qv for bug-guix@gnu.org; Sun, 19 Jan 2020 14:29:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1itGFq-0001p2-Mw for bug-guix@gnu.org; Sun, 19 Jan 2020 14:29:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:37032) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itGAB-0002FK-7E for bug-guix@gnu.org; Sun, 19 Jan 2020 14:23:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itGA9-0001Os-VG for bug-guix@gnu.org; Sun, 19 Jan 2020 14:23:11 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:40197) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1itGA9-0001OX-Oq for bug-guix@gnu.org; Sun, 19 Jan 2020 14:23:09 -0500 Received: by mail-wr1-x444.google.com with SMTP id c14so27368661wrn.7 for ; Sun, 19 Jan 2020 11:23:09 -0800 (PST) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: 39195@debbugs.gnu.org --000000000000d54581059c831a0d Content-Type: text/plain; charset="UTF-8" After a fresh Guix install, when calling subsequent ``guix pull`` it will always try to migrate the profile at ``/root/.cong/guix/current`` between ``/var/guix/profiles/default`` and ``/var/guix/profiles/per-user/root``. The issue is that if there are any existing links in the target folder, ``guix pull`` will fail: guix pull: error: symlink: File exists: "/var/guix/profiles/per-user/root/current-guix For example after unpacking the store, the first ``guix pull`` will migrate the profile to ``profiles/default``: # 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'... [...] Then 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*``. After this action, any other ``guix pull`` will run as expected. --000000000000d54581059c831a0d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
After a fresh Guix install, when calling subsequent `= `guix pull`` it will always try to migrate the profile at ``/root/.cong/gui= x/current`` between ``/var/guix/profiles/default`` and ``/var/guix/profiles= /per-user/root``.

The issue is that if there are a= ny existing links in the target folder, ``guix pull`` will fail:
=

=C2=A0=C2=A0=C2=A0=C2=A0 guix pull: error: symlink: File exists: "/var= /guix/profiles/per-user/root/current-guix

<= div>
For example after unpacking the store, the first ``guix = pull`` will migrate the profile to ``profiles/default``:


=C2=A0=C2=A0=C2=A0=20 # ls -l .config/guix/
=C2=A0=C2=A0=C2=A0 total 0
=C2=A0=C2=A0=C2=A0 l= rwxrwxrwx =C2=A0 =C2=A01 root =C2=A0 =C2=A0 root =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A045 Jan 19 18:33 current -> /var/guix/profiles/per-user/= root/current-guix
=C2=A0=C2=A0=C2=A0 # guix pull
=C2=A0=C2=A0=C2=A0 = Migrating profile generations to '/var/guix/profiles/default'...=C2=A0=C2=A0=C2=A0 Updating channel 'guix' from Git repository at = 'https://gi= t.savannah.gnu.org/git/guix.git'...
=C2=A0=C2=A0=C2=A0 [.= ..]


Then calling ``guix pull`` agai= n will fail:


=C2=A0=C2=A0=C2=A0 # ls -l .config/guix/
=C2=A0=C2=A0=C2=A0 total 0
= =C2=A0=C2=A0=C2=A0 lrwxrwxrwx =C2=A0 =C2=A01 root =C2=A0 =C2=A0 root =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A039 Jan 19 18:37 current -> /var/guix/= profiles/default/current-guix
=C2=A0=C2=A0=C2=A0 # guix pull
=C2=A0=C2=A0=C2=A0 Migrating profile generations to '= /var/guix/profiles/per-user/root'...
=C2=A0=C2=A0=C2=A0 guix pull: e= rror: 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*``. After this action, any other = ``guix pull`` will run as expected.

--000000000000d54581059c831a0d--