unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39195: guix pull switching between profiles/per-user and profiles/default
@ 2020-01-19 19:22 Jimmy Thrasibule
  2020-01-19 22:08 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Jimmy Thrasibule @ 2020-01-19 19:22 UTC (permalink / raw)
  To: 39195

[-- Attachment #1: Type: text/plain, Size: 1449 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 2064 bytes --]

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

* bug#39195: guix pull switching between profiles/per-user and profiles/default
  2020-01-19 19:22 bug#39195: guix pull switching between profiles/per-user and profiles/default Jimmy Thrasibule
@ 2020-01-19 22:08 ` Ludovic Courtès
  2020-01-20  9:26   ` Jimmy Thrasibule via Bug reports for GNU Guix
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2020-01-19 22:08 UTC (permalink / raw)
  To: Jimmy Thrasibule; +Cc: 39195, jimmy

Hi,

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

> 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”?

> 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:

  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=c20ba18304ee63f01895f092bb51bc2a9ce3303b

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:

  https://issues.guix.gnu.org/issue/36785

Perhaps that’s also what happened here?

Thanks,
Ludo’.

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

* bug#39195: guix pull switching between profiles/per-user and profiles/default
  2020-01-19 22:08 ` Ludovic Courtès
@ 2020-01-20  9:26   ` Jimmy Thrasibule via Bug reports for GNU Guix
  2020-01-20 15:45     ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Jimmy Thrasibule via Bug reports for GNU Guix @ 2020-01-20  9:26 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 39195

> What do you mean by “unpacking the store”?

I'm actually deploying Guix from the archive at
https://ftp.gnu.org/gnu/guix/guix-binary-1.0.1.x86_64-linux.tar.xz in
a Docker container.

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

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

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

* bug#39195: guix pull switching between profiles/per-user and profiles/default
  2020-01-20  9:26   ` Jimmy Thrasibule via Bug reports for GNU Guix
@ 2020-01-20 15:45     ` Ludovic Courtès
  2020-01-20 17:06       ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2020-01-20 15:45 UTC (permalink / raw)
  To: Jimmy Thrasibule; +Cc: 39195-done

Hi Jimmy,

Jimmy Thrasibule <jimmy@thrasibule.mx> 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’.

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

* bug#39195: guix pull switching between profiles/per-user and profiles/default
  2020-01-20 15:45     ` Ludovic Courtès
@ 2020-01-20 17:06       ` zimoun
  2020-01-21  9:04         ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: zimoun @ 2020-01-20 17:06 UTC (permalink / raw)
  To: 39195, Ludovic Courtès, jimmy; +Cc: 39195-done

Hi Ludo,

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

> 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

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

* bug#39195: guix pull switching between profiles/per-user and profiles/default
  2020-01-20 17:06       ` zimoun
@ 2020-01-21  9:04         ` Ludovic Courtès
  2020-01-21 13:49           ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2020-01-21  9:04 UTC (permalink / raw)
  To: zimoun; +Cc: 39195, 39195-done, jimmy

Hi,

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

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

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

* bug#39195: guix pull switching between profiles/per-user and profiles/default
  2020-01-21  9:04         ` Ludovic Courtès
@ 2020-01-21 13:49           ` zimoun
  0 siblings, 0 replies; 7+ messages in thread
From: zimoun @ 2020-01-21 13:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 39195, 39195-done, jimmy

Hi Ludo,

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

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

[1] https://lists.gnu.org/archive/html/guix-devel/2020-01/msg00385.html


Cheers,
simon

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

end of thread, other threads:[~2020-01-21 13:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-19 19:22 bug#39195: guix pull switching between profiles/per-user and profiles/default Jimmy Thrasibule
2020-01-19 22:08 ` Ludovic Courtès
2020-01-20  9:26   ` Jimmy Thrasibule via Bug reports for GNU Guix
2020-01-20 15:45     ` Ludovic Courtès
2020-01-20 17:06       ` zimoun
2020-01-21  9:04         ` Ludovic Courtès
2020-01-21 13:49           ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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