all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to properly upgrade Guix System & Home?
@ 2023-03-22 17:11 Tanguy LE CARROUR
  2023-03-22 17:24 ` Julien Lepiller
  0 siblings, 1 reply; 5+ messages in thread
From: Tanguy LE CARROUR @ 2023-03-22 17:11 UTC (permalink / raw)
  To: help-guix

Hi Guix,

For quite some time, I'd been religiously upgrading my system weekly.
My mantra was something along those lines:

```console
$ sudo guix system delete-generations
$ guix package --delete-generations
$ guix gc
$ guix pull
$ sudo guix system reconfigure my-system.scm
$ guix package --upgrade
```

I was happy with it, but two recent events made me question my faith in this…

1) I realized that there was a third `delete-generations`!

Believe it or not, I didn't know about `guix pull --delete-generations`.
Actually `guix pull --list-generations` was listing a **lot** of month
old stuff.

2) I migrated to Guix Home!

Suddenly everything I thought I understood didn't seem to make any sense
any more! For instance, I can do `guix home reconfigure` and `guix gc` in
a loop and `guix home reconfigure` will keep on downloading things and
`guix gc` will keep on deleting them!? And when I say "things", I mean
packages that are explicitly declared in `my-home.scm` and that I actually use!
When I compare `ls -l (which imv)` before and after a cycle
(`guix home reconfigure` / `guix gc`), I have the same hash.
Which make sense because I haven't `guix pull` in between. So, why is a `imv`
garbage collected and re-downloaded/installed?!

Does it make any sense? Am I the only one facing this issue? What's the
proper way of upgrading a Guix System & Home?

Any help would be very much appreciated!

-- 
Tanguy


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

* Re: How to properly upgrade Guix System & Home?
  2023-03-22 17:11 How to properly upgrade Guix System & Home? Tanguy LE CARROUR
@ 2023-03-22 17:24 ` Julien Lepiller
  2023-03-23  7:24   ` Tanguy LE CARROUR
  0 siblings, 1 reply; 5+ messages in thread
From: Julien Lepiller @ 2023-03-22 17:24 UTC (permalink / raw)
  To: help-guix, Tanguy LE CARROUR

Most likely, you're just seeing a weird behavior caused by grafts. To make a graft, guix needs the ungrafted package first, so it downloads it, grafts it and adds it to the profile. The grafted package is live, so it's protected against garbage collection. The ungrafted package is not, so it gets garbage coldected.

When you reconfigure, guix needs to download the ungrafted package before it figures out it already has the graft.

Since they have the same name and version, I think you're just cwnfusing the two :)

Le 22 mars 2023 18:11:45 GMT+01:00, Tanguy LE CARROUR <tanguy@bioneland.org> a écrit :
>Hi Guix,
>
>For quite some time, I'd been religiously upgrading my system weekly.
>My mantra was something along those lines:
>
>```console
>$ sudo guix system delete-generations
>$ guix package --delete-generations
>$ guix gc
>$ guix pull
>$ sudo guix system reconfigure my-system.scm
>$ guix package --upgrade
>```
>
>I was happy with it, but two recent events made me question my faith in this…
>
>1) I realized that there was a third `delete-generations`!
>
>Believe it or not, I didn't know about `guix pull --delete-generations`.
>Actually `guix pull --list-generations` was listing a **lot** of month
>old stuff.
>
>2) I migrated to Guix Home!
>
>Suddenly everything I thought I understood didn't seem to make any sense
>any more! For instance, I can do `guix home reconfigure` and `guix gc` in
>a loop and `guix home reconfigure` will keep on downloading things and
>`guix gc` will keep on deleting them!? And when I say "things", I mean
>packages that are explicitly declared in `my-home.scm` and that I actually use!
>When I compare `ls -l (which imv)` before and after a cycle
>(`guix home reconfigure` / `guix gc`), I have the same hash.
>Which make sense because I haven't `guix pull` in between. So, why is a `imv`
>garbage collected and re-downloaded/installed?!
>
>Does it make any sense? Am I the only one facing this issue? What's the
>proper way of upgrading a Guix System & Home?
>
>Any help would be very much appreciated!
>


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

* Re: How to properly upgrade Guix System & Home?
  2023-03-22 17:24 ` Julien Lepiller
@ 2023-03-23  7:24   ` Tanguy LE CARROUR
  2023-03-24 18:03     ` Maxim Cournoyer
  0 siblings, 1 reply; 5+ messages in thread
From: Tanguy LE CARROUR @ 2023-03-23  7:24 UTC (permalink / raw)
  To: Julien Lepiller, help-guix

Hi Julien,

Thanks for your reply!

Quoting Julien Lepiller (2023-03-22 18:24:37)
> Most likely, you're just seeing a weird behavior caused by grafts. […]
> When you reconfigure, guix needs to download the ungrafted package
> before it figures out it already has the graft.

Oh… Oh… grafts! 🤯


> Since they have the same name and version, I think you're just
> cwnfusing the two :)

"Confused" is the appropriate word, indeed! 😅

The thing is, I've been (for the last few months! 😱) in the process of
writing home services definitions to replace **all** my configuration files,
so I run **a lot** of `guix home reconfigure`. The command usually takes 30
seconds to run, but right after I `guix gc` it takes 10 minutes. So I
guess I should stop collecting garbage for the time being, which is most
inconvenient for it saves more than 4Go of disk space.

Thanks for the enlightenment!
Regards,

-- 
Tanguy


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

* Re: How to properly upgrade Guix System & Home?
  2023-03-23  7:24   ` Tanguy LE CARROUR
@ 2023-03-24 18:03     ` Maxim Cournoyer
  2023-03-25 16:02       ` Tanguy LE CARROUR
  0 siblings, 1 reply; 5+ messages in thread
From: Maxim Cournoyer @ 2023-03-24 18:03 UTC (permalink / raw)
  To: Tanguy LE CARROUR; +Cc: Julien Lepiller, help-guix

Hi,

Tanguy LE CARROUR <tanguy@bioneland.org> writes:

> Hi Julien,
>
> Thanks for your reply!
>
> Quoting Julien Lepiller (2023-03-22 18:24:37)
>> Most likely, you're just seeing a weird behavior caused by grafts. […]
>> When you reconfigure, guix needs to download the ungrafted package
>> before it figures out it already has the graft.
>
> Oh… Oh… grafts! 🤯
>
>
>> Since they have the same name and version, I think you're just
>> cwnfusing the two :)
>
> "Confused" is the appropriate word, indeed! 😅
>
> The thing is, I've been (for the last few months! 😱) in the process of
> writing home services definitions to replace **all** my configuration files,
> so I run **a lot** of `guix home reconfigure`. The command usually takes 30
> seconds to run, but right after I `guix gc` it takes 10 minutes. So I
> guess I should stop collecting garbage for the time being, which is most
> inconvenient for it saves more than 4Go of disk space.

I think we should do something on Guix's side too; it'd be more
intuitive and save resource/time if the things needed by grafts were
always available, i.e. prevented from being garbage collected.

-- 
Thanks,
Maxim


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

* Re: How to properly upgrade Guix System & Home?
  2023-03-24 18:03     ` Maxim Cournoyer
@ 2023-03-25 16:02       ` Tanguy LE CARROUR
  0 siblings, 0 replies; 5+ messages in thread
From: Tanguy LE CARROUR @ 2023-03-25 16:02 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Julien Lepiller, help-guix

Hi Maxim,


Quoting Maxim Cournoyer (2023-03-24 19:03:25)
> Tanguy LE CARROUR <tanguy@bioneland.org> writes:
> > Quoting Julien Lepiller (2023-03-22 18:24:37)
> >> Most likely, you're just seeing a weird behavior caused by grafts. […]
> >> When you reconfigure, guix needs to download the ungrafted package
> >> before it figures out it already has the graft.
> >
> > Oh… Oh… grafts! 🤯
> >
> >
> >> Since they have the same name and version, I think you're just
> >> cwnfusing the two :)
> >
> > "Confused" is the appropriate word, indeed! 😅
> >
> > The thing is, I've been (for the last few months! 😱) in the process of
> > writing home services definitions to replace **all** my configuration files,
> > so I run **a lot** of `guix home reconfigure`. The command usually takes 30
> > seconds to run, but right after I `guix gc` it takes 10 minutes. So I
> > guess I should stop collecting garbage for the time being, which is most
> > inconvenient for it saves more than 4Go of disk space.
> 
> I think we should do something on Guix's side too; it'd be more
> intuitive and save resource/time if the things needed by grafts were
> always available, i.e. prevented from being garbage collected.

I remember that something was said about grafts during the Guix Days.
But, for what I remember, it was more making sure that something that has been
grafted is ungrafted.
And, as I'm not exactly sure I understand everything about grafts, I going
to read (again!?) <https://guix.gnu.org/blog/2020/grafts-continued>.

Regards,

-- 
Tanguy


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

end of thread, other threads:[~2023-03-25 16:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-22 17:11 How to properly upgrade Guix System & Home? Tanguy LE CARROUR
2023-03-22 17:24 ` Julien Lepiller
2023-03-23  7:24   ` Tanguy LE CARROUR
2023-03-24 18:03     ` Maxim Cournoyer
2023-03-25 16:02       ` Tanguy LE CARROUR

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.