[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36555: [PATCH v6 3/3] tests: Add reconfigure system test.
From: |
Ludovic Courtès |
Subject: |
bug#36555: [PATCH v6 3/3] tests: Add reconfigure system test. |
Date: |
Fri, 26 Jul 2019 18:59:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Hi there!
I’ve applied the whole series with the change below. \o/
Because of the monadic style, the ‘guard’ clause had no effect:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,run-in-store (guard (c (#t 'caught)) (mbegin %store-monad
(return 1)(return (raise (condition (&message (message "oh!")))))))
While executing meta-command:
Throw to key `srfi-34' with args `(#<condition &message [message: "oh!"]
1cab2c0>)'.
--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
‘guix-system’. Hence the patch.
Thank you for the hard work on this series!
I’ll be away from keyboard roughly until August 17th. Hopefully you 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’m confident!
Ludo’.
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'...~%")
- [bug#36555] [PATCH v5 1/3] guix system: Add 'reconfigure' module., (continued)
- [bug#36555] [PATCH v5 1/3] guix system: Add 'reconfigure' module., Jakob L. Kreuze, 2019/07/22
- [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'., Jakob L. Kreuze, 2019/07/22
- [bug#36555] [PATCH v5 3/3] tests: Add reconfigure system test., Jakob L. Kreuze, 2019/07/22
- [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'., Ludovic Courtès, 2019/07/23
- [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'., Jakob L. Kreuze, 2019/07/23
- [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'., Jakob L. Kreuze, 2019/07/23
- [bug#36555] [PATCH v6 0/3] Refactor out common behavior for system reconfiguration., Jakob L. Kreuze, 2019/07/24
- [bug#36555] [PATCH v6 1/3] guix system: Add 'reconfigure' module., Jakob L. Kreuze, 2019/07/24
- [bug#36555] [PATCH v6 2/3] guix system: Reimplement 'reconfigure'., Jakob L. Kreuze, 2019/07/24
- [bug#36555] [PATCH v6 3/3] tests: Add reconfigure system test., Jakob L. Kreuze, 2019/07/24
- bug#36555: [PATCH v6 3/3] tests: Add reconfigure system test.,
Ludovic Courtès <=
- [bug#36555] [PATCH v6 3/3] tests: Add reconfigure system test., Jakob L. Kreuze, 2019/07/26
- [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'., Ludovic Courtès, 2019/07/24
- [bug#36555] [PATCH v4 3/3] tests: Add reconfigure system test., Ludovic Courtès, 2019/07/23
- [bug#36555] [PATCH v4 3/3] tests: Add reconfigure system test., Jakob L. Kreuze, 2019/07/23
- [bug#36555] [PATCH v4 3/3] tests: Add reconfigure system test., Ludovic Courtès, 2019/07/24
- [bug#36555] [PATCH v4 2/3] guix system: Reimplement 'reconfigure'., Ludovic Courtès, 2019/07/20
- [bug#36555] [PATCH v4 1/3] guix system: Add 'reconfigure' module., Ludovic Courtès, 2019/07/20
- [bug#36555] [PATCH v4 1/3] guix system: Add 'reconfigure' module., Jakob L. Kreuze, 2019/07/30
- [bug#36555] [PATCH v4 1/3] guix system: Add 'reconfigure' module., Jakob L. Kreuze, 2019/07/19
- [bug#36555] [PATCH v3 0/3] Refactor out common behavior for system reconfiguration., Christopher Lemmer Webber, 2019/07/19