unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36374: ‘guix pull’ should not suggest running ‘guix pull’
@ 2019-06-25 14:08 Ludovic Courtès
  2019-06-26 14:19 ` Julien Lepiller
  2022-03-23 11:23 ` zimoun
  0 siblings, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2019-06-25 14:08 UTC (permalink / raw)
  To: bug-Guix

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

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

* bug#36374: ‘guix pull’ should not suggest running ‘guix pull’
  2019-06-25 14:08 bug#36374: ‘guix pull’ should not suggest running ‘guix pull’ Ludovic Courtès
@ 2019-06-26 14:19 ` Julien Lepiller
  2019-06-27  9:55   ` Ludovic Courtès
  2022-03-23 11:23 ` zimoun
  1 sibling, 1 reply; 7+ messages in thread
From: Julien Lepiller @ 2019-06-26 14:19 UTC (permalink / raw)
  To: 36374, ludo

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

Le 25 juin 2019 16:08:19 GMT+02:00, "Ludovic Courtès" <ludo@gnu.org> a écrit :
>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.

[-- Attachment #2: 0001-gnu-system-Symlink-guix-inside-an-initial-guix-pull-.patch --]
[-- Type: application/octet-stream, Size: 1536 bytes --]

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.

* gnu/system/shadow.scm (skeleton-directory): Symlink guix inside an
initial guix pull profile.
---
 gnu/system/shadow.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 13b8b14095..837be44b2c 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -223,6 +223,12 @@ for a colorful Guile experience.\\n\\n\"))))\n"))
                                    ((target source)
                                     (copy-recursively source target)))
                                  '#$skeletons)
+
+                       ;; Symlink the current profile to a default system profile.
+                       (mkdir-p (string-append #$output "/.config/guix/initial/bin"))
+                       (symlink "/run/current-system/profile/bin/guix"
+                                ".config/guix/initial/bin/guix")
+                       (symlink "initial" ".config/guix/current")
                        #t))))
 
 (define (assert-valid-users/groups users groups)
-- 
2.21.0


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

* bug#36374: ‘guix pull’ should not suggest running ‘guix pull’
  2019-06-26 14:19 ` Julien Lepiller
@ 2019-06-27  9:55   ` Ludovic Courtès
  2020-03-24 17:18     ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2019-06-27  9:55 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 36374

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

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

* bug#36374: ‘guix pull’ should not suggest running ‘guix pull’
  2019-06-27  9:55   ` Ludovic Courtès
@ 2020-03-24 17:18     ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2020-03-24 17:18 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 36374

Ping!  :-)

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

Now’s a good time to fix this one!

Ludo’.

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

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

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

* bug#36374: ‘guix pull’ should not suggest running ‘guix pull’
  2019-06-25 14:08 bug#36374: ‘guix pull’ should not suggest running ‘guix pull’ Ludovic Courtès
  2019-06-26 14:19 ` Julien Lepiller
@ 2022-03-23 11:23 ` zimoun
  2022-03-24  8:37   ` Ludovic Courtès
  1 sibling, 1 reply; 7+ messages in thread
From: zimoun @ 2022-03-23 11:23 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 36374

Hi,

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?


Cheers,
simon




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

* bug#36374: ‘guix pull’ should not suggest running ‘guix pull’
  2022-03-23 11:23 ` zimoun
@ 2022-03-24  8:37   ` Ludovic Courtès
  2022-06-23  9:30     ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2022-03-24  8:37 UTC (permalink / raw)
  To: zimoun; +Cc: 36374

Hi,

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

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




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

* bug#36374: ‘guix pull’ should not suggest running ‘guix pull’
  2022-03-24  8:37   ` Ludovic Courtès
@ 2022-06-23  9:30     ` zimoun
  0 siblings, 0 replies; 7+ messages in thread
From: zimoun @ 2022-06-23  9:30 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Julien Lepiller, 36374

Hi Julien,

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

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

Friendly ping. :-)

Cheers,
simon




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

end of thread, other threads:[~2022-06-23 10:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 14:08 bug#36374: ‘guix pull’ should not suggest running ‘guix pull’ Ludovic Courtès
2019-06-26 14:19 ` Julien Lepiller
2019-06-27  9:55   ` Ludovic Courtès
2020-03-24 17:18     ` Ludovic Courtès
2022-03-23 11:23 ` zimoun
2022-03-24  8:37   ` Ludovic Courtès
2022-06-23  9:30     ` zimoun

Code repositories for project(s) associated with this 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).