From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 26 06:07:38 2019 Received: (at 36855) by debbugs.gnu.org; 26 Aug 2019 10:07:38 +0000 Received: from localhost ([127.0.0.1]:45628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i2BuU-0006mQ-1e for submit@debbugs.gnu.org; Mon, 26 Aug 2019 06:07:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i2BuS-0006mE-VK for 36855@debbugs.gnu.org; Mon, 26 Aug 2019 06:07:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i2BuN-0002I0-PN; Mon, 26 Aug 2019 06:07:31 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=47550 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i2BuN-0001oH-4I; Mon, 26 Aug 2019 06:07:31 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Chris Marusich Subject: Re: bug#36855: guix system switch-generation doesn't References: <7BE8190F-A8E9-454E-8F37-FBFE42FBDE10@vllmrt.net> <87zhkkojfv.fsf@dustycloud.org> <877e7on3zd.fsf@sdf.lonestar.org> <87h86ry5j5.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 Fructidor an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 26 Aug 2019 12:07:29 +0200 In-Reply-To: <87h86ry5j5.fsf@gmail.com> (Chris Marusich's message of "Thu, 08 Aug 2019 09:40:30 -0700") Message-ID: <874l241bq6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36855 Cc: guix-devel@gnu.org, "Jakob L. Kreuze" , 36855@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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.