Subject: bug#39195: closed (Re: bug#39195: guix pull switching between profiles/per-user and profiles/default)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 20 Jan 2020 15:46:02 +0000

Your bug report

#39195: guix pull switching between profiles/per-user and profiles/default

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
39195: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39195
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#39195: guix pull switching between profiles/per-user and profiles/default
From: Ludovic Courtès <[email-masked]>
To: Jimmy Thrasibule <[email-masked]>
Cc: [email-masked]
Date: Mon, 20 Jan 2020 16:45:28 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Jimmy,

Jimmy Thrasibule <[email-masked]> skribis:

>> but it’s possible that you were running a version that lacks this fix.
>
> That's is what I started to understand after playing around a bit. The
> Guix version provided into the archive is old so it was failing back
> to the "default" profile. Once upgraded, the "new" Guix was trying to
> switch back to the "root" profile.
>
> Now with the $USER environment variable set all is working great.

Good to hear.  I guess that’s another reason why we should push a new
release.

Thanks for your feedback!

Ludo’.

Subject: guix pull switching between profiles/per-user and profiles/default
From: Jimmy Thrasibule <[email-masked]>
To: [email-masked]
Date: Sun, 19 Jan 2020 20:22:58 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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.