From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:54253) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjt3H-0003CX-Pf for guix-patches@gnu.org; Sat, 06 Jul 2019 18:21:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjt3G-0003Jr-Pu for guix-patches@gnu.org; Sat, 06 Jul 2019 18:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47142) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hjt3G-0003Jf-Lz for guix-patches@gnu.org; Sat, 06 Jul 2019 18:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hjt3G-0006PG-Eg for guix-patches@gnu.org; Sat, 06 Jul 2019 18:21:02 -0400 Subject: [bug#36404] [PATCH 3/3] guix system: Reimplement 'reconfigure'. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87o92ianbj.fsf@sdf.lonestar.org> <87o92glap5.fsf@dustycloud.org> <878sthoqzi.fsf@gnu.org> <87r2799tzd.fsf@sdf.lonestar.org> <87d0isrsmk.fsf@sdf.lonestar.org> <878std3fw0.fsf@sdf.lonestar.org> <87wogwoqrg.fsf@gnu.org> <87bly8f3kq.fsf_-_@sdf.lonestar.org> <877e8wf3iz.fsf_-_@sdf.lonestar.org> <8736jkf3h5.fsf_-_@sdf.lonestar.org> <87y31cdovf.fsf_-_@sdf.lonestar.org> Date: Sun, 07 Jul 2019 00:20:00 +0200 In-Reply-To: <87y31cdovf.fsf_-_@sdf.lonestar.org> (Jakob L. Kreuze's message of "Fri, 05 Jul 2019 19:48:36 -0400") Message-ID: <87imseerfz.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: "Jakob L. Kreuze" Cc: 36404@debbugs.gnu.org Hi, zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) skribis: > +(define (%upgrade-shepherd-services os) > "Upgrade the Shepherd (PID 1) by unloading obsolete services and loadi= ng new > services specified in OS and not currently running. >=20=20 > This is currently very conservative in that it does not stop or unload a= ny > running service. Unloading or stopping the wrong service ('udev', say) = could > bring the system down." > - (define new-services > - (service-value > - (fold-services (operating-system-services os) > - #:target-type shepherd-root-service-type))) > - > - ;; Arrange to simply emit a warning if the service upgrade fails. > - (with-shepherd-error-handling > - (call-with-service-upgrade-info new-services > - (lambda (to-restart to-unload) I think you=E2=80=99d need to include the =E2=80=98call-with-service-upgrad= e-info=E2=80=99 call in the service-upgrade program that (guix scripts system reconfigure) produces. It=E2=80=99s an important part of reconfiguration. However, =E2=80=98call-with-service-upgrade-info=E2=80=99 relies on (guix g= raph), which pulls in (guix monads) and many modules that we don=E2=80=99t actually need. It=E2=80=99s probably just an annoyance more than a real problem, but I thi= nk we should eventually change the (guix graph) API so that it no longer relies on the =E2=80=98%store-monad=E2=80=99, which in turn will make it a = better fit in this context. Thanks for quickly hacking on this! Ludo=E2=80=99.