summaryrefslogtreecommitdiff
path: root/guix/scripts/system.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-04-08 13:00:50 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-04-08 13:00:50 +0200
commit27783023993f9272ce422868d14529159c4a5218 (patch)
tree9013b08aa39e497b1fd8e01a05254278d83f0ff7 /guix/scripts/system.scm
parentbe1e842ad78ac6c52fc7790f4a3ffd716673c111 (diff)
parentba6f2bda18ed19fa486a9c3e2c3baea6c66c6867 (diff)
downloadguix-patches-27783023993f9272ce422868d14529159c4a5218.tar
guix-patches-27783023993f9272ce422868d14529159c4a5218.tar.gz
Merge branch 'master' into core-updates
Conflicts: etc/news.scm gnu/local.mk gnu/packages/check.scm gnu/packages/cross-base.scm gnu/packages/gimp.scm gnu/packages/java.scm gnu/packages/mail.scm gnu/packages/sdl.scm gnu/packages/texinfo.scm gnu/packages/tls.scm gnu/packages/version-control.scm
Diffstat (limited to 'guix/scripts/system.scm')
-rw-r--r--guix/scripts/system.scm32
1 files changed, 9 insertions, 23 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index a178761203..2664c66a30 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -258,7 +258,7 @@ expression in %STORE-MONAD."
(lambda ()
(guard (c ((shepherd-error? c)
(values (report-shepherd-error c) store)))
- (values (run-with-store store (begin mbody ...))
+ (values (run-with-store store (mbegin %store-monad mbody ...))
store)))
(lambda (key proc format-string format-args errno . rest)
(warning (G_ "while talking to shepherd: ~a~%")
@@ -290,22 +290,6 @@ on service '~a':~%")
((not error) ;not an error
#t)))
-(define (call-with-service-upgrade-info new-services mproc)
- "Call MPROC, a monadic procedure in %STORE-MONAD, passing it the list of
-names of services to load (upgrade), and the list of names of services to
-unload."
- (match (current-services)
- ((services ...)
- (let-values (((to-unload to-restart)
- (shepherd-service-upgrade services new-services)))
- (mproc to-restart
- (map (compose first live-service-provision)
- to-unload))))
- (#f
- (with-monad %store-monad
- (warning (G_ "failed to obtain list of shepherd services~%"))
- (return #f)))))
-
(define-syntax-rule (unless-file-not-found exp)
(catch 'system-error
(lambda ()
@@ -825,10 +809,10 @@ static checks."
;; For 'init' and 'reconfigure', always build BOOTCFG, even if
;; --no-bootloader is passed, because we then use it as a GC root.
;; See <http://bugs.gnu.org/21068>.
- (drvs (mapm %store-monad lower-object
- (if (memq action '(init reconfigure))
- (list sys bootcfg)
- (list sys))))
+ (drvs (mapm/accumulate-builds lower-object
+ (if (memq action '(init reconfigure))
+ (list sys bootcfg)
+ (list sys))))
(% (if derivations-only?
(return (for-each (compose println derivation-file-name)
drvs))
@@ -853,7 +837,10 @@ static checks."
(info (G_ "bootloader successfully installed on '~a'~%")
(bootloader-configuration-target bootloader))))
(with-shepherd-error-handling
- (upgrade-shepherd-services local-eval os))))
+ (upgrade-shepherd-services local-eval os)
+ (return (format #t (G_ "\
+To complete the upgrade, run 'herd restart SERVICE' to stop,
+upgrade, and restart each service that was not automatically restarted.\n"))))))
((init)
(newline)
(format #t (G_ "initializing operating system under '~a'...~%")
@@ -1294,7 +1281,6 @@ argument list and OPTS is the option alist."
(process-command command args opts))))))
;;; Local Variables:
-;;; eval: (put 'call-with-service-upgrade-info 'scheme-indent-function 1)
;;; eval: (put 'with-store* 'scheme-indent-function 1)
;;; End: