From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Subject: bug#36855: guix system switch-generation doesn't Date: Mon, 26 Aug 2019 12:07:29 +0200 Message-ID: <874l241bq6.fsf__35802.4716888153$1566814098$gmane$org@gnu.org> References: <7BE8190F-A8E9-454E-8F37-FBFE42FBDE10@vllmrt.net> <87zhkkojfv.fsf@dustycloud.org> <877e7on3zd.fsf@sdf.lonestar.org> <87h86ry5j5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34332) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2But-0003GB-El for bug-guix@gnu.org; Mon, 26 Aug 2019 06:08:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2Bus-0002Z0-Ap for bug-guix@gnu.org; Mon, 26 Aug 2019 06:08:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36807) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i2Bus-0002Ys-7s for bug-guix@gnu.org; Mon, 26 Aug 2019 06:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i2Bus-0006n3-0w for bug-guix@gnu.org; Mon, 26 Aug 2019 06:08:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87h86ry5j5.fsf@gmail.com> (Chris Marusich's message of "Thu, 08 Aug 2019 09:40:30 -0700") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Chris Marusich Cc: guix-devel@gnu.org, 36855@debbugs.gnu.org Hey Chris & Jakob, Chris Marusich skribis: > zerodaysfordays@sdf.lonestar.org (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=E2=80=99= t we take it one step further and store those scripts in the =E2=80=9Csystem=E2= =80=9D derivation so we can run them eventually, notably upon =E2=80=98switch-generation=E2=80=99? > 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=E2=80=99ve actually never used =E2=80=98switch-generations=E2=80=99 on my laptop, but technically, I feel = like storing the =E2=80=9Cswitch-to-system=E2=80=9D script would be the easiest way. Thanks, Ludo=E2=80=99.