‘guix pull’ should not suggest running ‘guix pull’

  • Open
  • quality assurance status badge
Details
3 participants
  • Julien Lepiller
  • Ludovic Courtès
  • zimoun
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
important
L
J
J
Julien Lepiller wrote on 26 Jun 2019 16:19
Re: bug#36374: ‘guix pull’ shoul d not suggest running ‘guix pull’
E398A193-BBCE-4EDE-9671-B4A0AAD2998E@lepiller.eu
Le 25 juin 2019 16:08:19 GMT+02:00, "Ludovic Courtès" <ludo@gnu.org> a écrit :
Toggle quote (7 lines)
>The article at
><https://distrowatch.com/weekly.php?issue=20190624#guixsd> has a
>screenshot showing ‘guix pull’ suggesting to run ‘guix pull && guix
>package -u’. This is obviously wrong.
>
>Ludo’.

Here is a patch to address this issue on Guix System. It creates new files in /etc/skel: an initial profile (.config/guix/initial) tgat only contains a symlink to /run/current-system/profile/bin/guix and the current profile as a symlink to the initial profile.

At first boot, and for new users, guix well be found in the current profile, and stays there after guix pull, so we don't need to use hash guix anymore.
L
L
Ludovic Courtès wrote on 27 Jun 2019 11:55
Re: bug#36374: ‘guix pull’ should not suggest running ‘guix pull’
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 36374@debbugs.gnu.org)
87lfxn2vzb.fsf@gnu.org
Hello!

Julien Lepiller <julien@lepiller.eu> skribis:

Toggle quote (9 lines)
> Here is a patch to address this issue on Guix System. It creates new
> files in /etc/skel: an initial profile (.config/guix/initial) tgat
> only contains a symlink to /run/current-system/profile/bin/guix and
> the current profile as a symlink to the initial profile.
>
> At first boot, and for new users, guix well be found in the current
> profile, and stays there after guix pull, so we don't need to use hash
> guix anymore.

I think this addresses the “hash guix” issue (this will no longer be
needed with this patch), but it only indirectly solves the “guix pull”
suggestion issue, right?

Toggle quote (11 lines)
> From 89b5fa77af87e1a1537c10e929439a902806cc5c Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Wed, 26 Jun 2019 14:24:55 +0200
> Subject: [PATCH] gnu: system: Symlink guix inside an initial guix pull
> profile.
>
> This patch adds an initial guix pull profile to the skeletons files used
> on Guix System. This ensures that users don't have to type 'hash guix'
> after their first guix pull, and prevents 'guix pull' from suggesting to
> run 'guix pull' after it finished successfuly.

It prevents the suggestion, but only because the symlink appears to be
new. If you change the mtime of the symlink, or if you run:

GUIX_DISTRO_AGE_WARNING=1s guix pull

I think you still get the “guix pull” recommendation.

Toggle quote (3 lines)
> * gnu/system/shadow.scm (skeleton-directory): Symlink guix inside an
> initial guix pull profile.

Perhaps we should add it to ‘default-skeletons’ instead of
special-casing it here? WDYT?

Thanks for working on it!

Ludo’.
L
L
Ludovic Courtès wrote on 27 Jun 2019 17:20
control message for bug #36374
(address . control@debbugs.gnu.org)
87v9wrxdf2.fsf@gnu.org
severity 36374 important
quit
L
L
Ludovic Courtès wrote on 24 Mar 2020 18:18
Re: bug#36374: ‘guix pull’ should not suggest running ‘guix pull’
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 36374@debbugs.gnu.org)
87bloln02u.fsf@gnu.org
Ping! :-)


Now’s a good time to fix this one!

Ludo’.

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (44 lines)
> Hello!
>
> Julien Lepiller <julien@lepiller.eu> skribis:
>
>> Here is a patch to address this issue on Guix System. It creates new
>> files in /etc/skel: an initial profile (.config/guix/initial) tgat
>> only contains a symlink to /run/current-system/profile/bin/guix and
>> the current profile as a symlink to the initial profile.
>>
>> At first boot, and for new users, guix well be found in the current
>> profile, and stays there after guix pull, so we don't need to use hash
>> guix anymore.
>
> I think this addresses the “hash guix” issue (this will no longer be
> needed with this patch), but it only indirectly solves the “guix pull”
> suggestion issue, right?
>
>> From 89b5fa77af87e1a1537c10e929439a902806cc5c Mon Sep 17 00:00:00 2001
>> From: Julien Lepiller <julien@lepiller.eu>
>> Date: Wed, 26 Jun 2019 14:24:55 +0200
>> Subject: [PATCH] gnu: system: Symlink guix inside an initial guix pull
>> profile.
>>
>> This patch adds an initial guix pull profile to the skeletons files used
>> on Guix System. This ensures that users don't have to type 'hash guix'
>> after their first guix pull, and prevents 'guix pull' from suggesting to
>> run 'guix pull' after it finished successfuly.
>
> It prevents the suggestion, but only because the symlink appears to be
> new. If you change the mtime of the symlink, or if you run:
>
> GUIX_DISTRO_AGE_WARNING=1s guix pull
>
> I think you still get the “guix pull” recommendation.
>
>> * gnu/system/shadow.scm (skeleton-directory): Symlink guix inside an
>> initial guix pull profile.
>
> Perhaps we should add it to ‘default-skeletons’ instead of
> special-casing it here? WDYT?
>
> Thanks for working on it!
>
> Ludo’.
Z
Z
zimoun wrote on 23 Mar 2022 12:23
(name . Ludovic Courtès)(address . ludo@gnu.org)
86a6dg29qw.fsf@gmail.com
Hi,

This old report and associated patch is uncommented since a while?


What do we do? Include the proposed patch? Other ideas?


Cheers,
simon
L
L
Ludovic Courtès wrote on 24 Mar 2022 09:37
(name . zimoun)(address . zimon.toutoune@gmail.com)
871qyrg30u.fsf@gnu.org
Hi,

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

Toggle quote (6 lines)
> This old report and associated patch is uncommented since a while?
>
> <http://issues.guix.gnu.org/issue/36374>
>
> What do we do? Include the proposed patch? Other ideas?

I think the initial patch doesn’t work reliably, as I wrote back then,
but something like that might work. Julien?

Ludo’.
Z
Z
zimoun wrote on 23 Jun 2022 11:30
(name . Ludovic Courtès)(address . ludo@gnu.org)
865ykr916z.fsf@gmail.com
Hi Julien,

On Thu, 24 Mar 2022 at 09:37, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (7 lines)
>>
>> What do we do? Include the proposed patch? Other ideas?
>
> I think the initial patch doesn’t work reliably, as I wrote back then,
> but something like that might work. Julien?

Friendly ping. :-)

Cheers,
simon
?