From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:45309) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hr3aj-0003vp-PB for guix-patches@gnu.org; Fri, 26 Jul 2019 13:01:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hr3ae-00008p-24 for guix-patches@gnu.org; Fri, 26 Jul 2019 13:01:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34478) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hr3aY-00004q-VZ for guix-patches@gnu.org; Fri, 26 Jul 2019 13:01:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hr3aY-0008QC-OR for guix-patches@gnu.org; Fri, 26 Jul 2019 13:01:02 -0400 Subject: bug#36555: [PATCH v6 3/3] tests: Add reconfigure system test. Resent-To: guix-patches@gnu.org Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87imsci9sj.fsf@sdf.lonestar.org> <87muhfjm14.fsf@gnu.org> <87ftn63l7d.fsf@sdf.lonestar.org> <87v9w1zgon.fsf_-_@sdf.lonestar.org> <87y30v3qke.fsf@sdf.lonestar.org> <871rylrjt8.fsf_-_@sdf.lonestar.org> <87wogdq575.fsf_-_@sdf.lonestar.org> <87r26lq531.fsf_-_@sdf.lonestar.org> <87muh9q51e.fsf_-_@sdf.lonestar.org> <87wogc4v6e.fsf@gnu.org> <87zhl69box.fsf@sdf.lonestar.org> <87o91laojb.fsf_-_@sdf.lonestar.org> <87k1c9aofq.fsf_-_@sdf.lonestar.org> <87ftmxaodv.fsf_-_@sdf.lonestar.org> <87ftmwz8mc.fsf@gnu.org> <877e889tyj.fsf@sdf.lonestar.org> <87tvbc8dgi.fsf@sdf.lonestar.org> <87muh3bdf4.fsf_-_@sdf.lonestar.org> <87imrrbddx.fsf_-_@sdf.lonestar.org> <87ef2fbdcx.fsf_-_@sdf.lonestar.org> <87a7d3bdc1.fsf_-_@sdf.lonestar.org> Date: Fri, 26 Jul 2019 18:59:50 +0200 In-Reply-To: <87a7d3bdc1.fsf_-_@sdf.lonestar.org> (Jakob L. Kreuze's message of "Wed, 24 Jul 2019 12:35:10 -0400") Message-ID: <87wog4k9yx.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: 36555-done@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi there! I=E2=80=99ve applied the whole series with the change below. \o/ Because of the monadic style, the =E2=80=98guard=E2=80=99 clause had no eff= ect: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,run-in-store (guard (c (#t 'caught)) (mbegin %store-m= onad (return 1)(return (raise (condition (&message (message "oh!"))))))) While executing meta-command: Throw to key `srfi-34' with args `(#)'. --8<---------------cut here---------------end--------------->8--- I thought about adding it in some other way, but it turns out not to be needed at all because error conditions are guarded against in =E2=80=98guix-system=E2=80=99. Hence the patch. Thank you for the hard work on this series! I=E2=80=99ll be away from keyboard roughly until August 17th. Hopefully yo= u can get feedback from David or Chris, and maybe you can get others on board as well. :-) If my opinion on changes to the core is needed, you can always push to a separate branch in the meantime. Anyway, I=E2=80=99m conf= ident! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 115da665b4..9fc3a10e98 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -804,19 +804,16 @@ static checks." ((reconfigure) (newline) (format #t (G_ "activating system...~%")) - (guard (c ((message-condition? c) - (leave (G_ "failed to reconfigure system:~%~a~%") - (condition-message c)))) - (mbegin %store-monad - (switch-to-system local-eval os) - (mwhen install-bootloader? - (install-bootloader local-eval bootloader bootcfg - #:target (or target "/")) - (return - (info (G_ "bootloader successfully installed on '~a'~%") - (bootloader-configuration-target bootloader)))) - (with-shepherd-error-handling - (upgrade-shepherd-services local-eval os))))) + (mbegin %store-monad + (switch-to-system local-eval os) + (mwhen install-bootloader? + (install-bootloader local-eval bootloader bootcfg + #:target (or target "/")) + (return + (info (G_ "bootloader successfully installed on '~a'~%") + (bootloader-configuration-target bootloader)))) + (with-shepherd-error-handling + (upgrade-shepherd-services local-eval os)))) ((init) (newline) (format #t (G_ "initializing operating system under '~a'...~%") --=-=-=--