[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36855: guix system switch-generation doesn't

From: Ludovic Courtès
Subject: bug#36855: guix system switch-generation doesn't
Date: Mon, 26 Aug 2019 12:07:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Hey Chris & Jakob,

Chris Marusich <address@hidden> skribis:

> address@hidden (Jakob L. Kreuze) writes:
>> 'switch-to-system-generation' doesn't call out to
>> 'upgrade-shepherd-services'. I'm not sure if this was an intentional
>> decision or not
> It is intentional, but only because there is currently no way to call
> upgrade-shepherd-services when switching system generations.


> FYI, last I checked (about 3 years ago), in NixOS they took a slightly
> different approach: instead of storing state describing the previous
> system generation and relying on the current system's logic to correctly
> parse it and use it to revert the system to a prior configuration, they
> just dump everything into a self-contained script that knows how to
> update the entire system to one specific configuration.  That approach
> is nice in some ways because switching generations is dead simple - you
> just run the switching script belonging to the generation you want to
> switch to - but it also has downsides.

Jakob, now that we generate scripts for the effectful bits of system
reconfiguration (one of these bits being service upgrades), couldn’t we
take it one step further and store those scripts in the “system”
derivation so we can run them eventually, notably upon

> For example, if the target generation is old enough compared to the
> current system, then the target generation's old switching script might
> not understand how to deal with the current system correctly.  Instead,
> if you only store the bare minimum of state required to take the right
> actions, and you implement the meat of the logic in the current Guix
> installation, you are more likely to be able to switch generations even
> to very old ones where the world was very different, since the current
> Guix can be taught how to deal gracefully with the old world.  But it
> seems more complicated.  It's all about trade-offs.

Indeed.  The important thing to me is that from the GRUB menu you can
really switch to any generation.  I’ve actually never used
‘switch-generations’ on my laptop, but technically, I feel like storing
the “switch-to-system” script would be the easiest way.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]