guix pull switching between profiles/per-user and profiles/default

DoneSubmitted by Jimmy Thrasibule.
Details
4 participants
  • Jimmy Thrasibule
  • Jimmy Thrasibule
  • Ludovic Courtès
  • zimoun
Owner
unassigned
Severity
normal
J
J
Jimmy Thrasibule wrote on 19 Jan 2020 20:22
(address . bug-guix@gnu.org)
CAMqSRmDaD2N+4Z0RjYHQsFzky2-wUfQ-hLmMZGAANYVvpD230g@mail.gmail.com
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 '
[...]


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.
Attachment: file
L
L
Ludovic Courtès wrote on 19 Jan 2020 23:08
(name . Jimmy Thrasibule)(address . jimmy.thrasibule@gmail.com)
87d0bfqeu6.fsf@gnu.org
Hi,

Jimmy Thrasibule <jimmy.thrasibule@gmail.com> skribis:

Toggle quote (3 lines)
> For example after unpacking the store, the first ``guix pull`` will migrate
> the profile to ``profiles/default``:

What do you mean by “unpacking the store”?

Toggle quote (4 lines)
> 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.

I believe /var/guix/profiles/default is used because neither $USER nor
$LOGNAME were defined, right?

This was fixed here:


but it’s possible that you were running a version that lacks this fix.

Also, there was a bug on Ubuntu where “sudo guix pull” would misbehave:


Perhaps that’s also what happened here?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 20 Jan 2020 16:45
(name . Jimmy Thrasibule)(address . jimmy@thrasibule.mx)(address . 39195-done@debbugs.gnu.org)
87iml6gmhz.fsf@gnu.org
Hi Jimmy,

Jimmy Thrasibule <jimmy@thrasibule.mx> skribis:

Toggle quote (9 lines)
>> 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’.
Closed
J
J
Jimmy Thrasibule wrote on 20 Jan 2020 10:26
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 39195@debbugs.gnu.org)
CAE5JQ8BmpoAxFVTa3KuK2q05ou_cEJVJAxydeTf+91UvgrhveQ@mail.gmail.com
Toggle quote (2 lines)
> What do you mean by “unpacking the store”?

I'm actually deploying Guix from the archive at
a Docker container.

Toggle quote (7 lines)
> I believe /var/guix/profiles/default is used because neither $USER nor
> $LOGNAME were defined, right?
>
> This was fixed here:
>
> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=c20ba18304ee63f01895f092bb51bc2a9ce3303b

This is the piece of code I was looking for to understand where this
"default" profile was coming from. The $USER environment variable was
indeed not set into the Docker image. Now that it is done, Guix does
not complain about the profile anymore.

Toggle quote (2 lines)
> 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.
Z
Z
zimoun wrote on 20 Jan 2020 18:06
(address . 39195-done@debbugs.gnu.org)
CAJ3okZ0-BhZ0zVsNCzQjM7wYKkD-wr2_fFPrM-tYd0qPO++pyQ@mail.gmail.com
Hi Ludo,

On Mon, 20 Jan 2020 at 16:46, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (3 lines)
> Good to hear. I guess that’s another reason why we should push a new
> release.

I even propose that Guix bumps the minor version each time
core-updates or staging is merged. :-)
Zero cost for us to bump the minor version. And the plus are:

- a bit easier to navigate; because there more tags in the repo ;-)
- non rolling release users expect version numbering; other said
current Debian or Ubuntu users are "afraid" to "pull" and be in
"unstable", so they jump only from version to version.

We could add a policy about the bumping the minor version.

What do you think?


Cheers,
simon
L
L
Ludovic Courtès wrote on 21 Jan 2020 10:04
(name . zimoun)(address . zimon.toutoune@gmail.com)
87o8uxfaew.fsf@gnu.org
Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

Toggle quote (13 lines)
> I even propose that Guix bumps the minor version each time
> core-updates or staging is merged. :-)
> Zero cost for us to bump the minor version. And the plus are:
>
> - a bit easier to navigate; because there more tags in the repo ;-)
> - non rolling release users expect version numbering; other said
> current Debian or Ubuntu users are "afraid" to "pull" and be in
> "unstable", so they jump only from version to version.
>
> We could add a policy about the bumping the minor version.
>
> What do you think?

I guess semver doesn’t apply to Guix taken as a whole, so version
numbers should be chosen to suggest how “different” the new release is.
That’s pretty subjective, though.

Ludo’.
Z
Z
zimoun wrote on 21 Jan 2020 14:49
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAJ3okZ0LG9J=kY2hD=azY8QnX0nWZe_n=ukbtmPkrMLguQOw2w@mail.gmail.com
Hi Ludo,

On Tue, 21 Jan 2020 at 10:04, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (8 lines)
> > We could add a policy about the bumping the minor version.
> >
> > What do you think?
>
> I guess semver doesn’t apply to Guix taken as a whole, so version
> numbers should be chosen to suggest how “different” the new release is.
> That’s pretty subjective, though.

I move the discussion to guix-devel [1] to keep cleaner the Bug Tracker. ;-)



Cheers,
simon
?
Your comment

This issue is archived.

To comment on this conversation send email to 39195@debbugs.gnu.org