guix system: Use 'shepherd-service-lookup-procedure' in 'service-upgrade'.

* guix/scripts/system.scm (service-upgrade)[essential?]: SERVICE is now
a <live-service>.
[lookup-target, lookup-live, running?, stopped, obsolete?]: New
procedures.
[to-load, to-unload]: Use them.  TO-UNLOAD is now a list of
<live-service>.
(call-with-service-upgrade-info): Extract symbols from TO-UNLOAD.
* tests/system.scm ("service-upgrade: one unchanged, one upgraded, one
new"): Adjust accordingly.
This commit is contained in:
Ludovic Courtès 2016-08-31 12:49:45 +02:00
parent a5d78eb64b
commit f20a7b8696
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 34 additions and 27 deletions

View file

@ -129,7 +129,7 @@
list))
(test-equal "service-upgrade: one unchanged, one upgraded, one new"
'((bar) ;unload
'(((bar)) ;unload
((bar) (baz))) ;load
(call-with-values
(lambda ()
@ -146,6 +146,7 @@
(shepherd-service (provision '(baz))
(start #t)))))
(lambda (unload load)
(list unload (map shepherd-service-provision load)))))
(list (map live-service-provision unload)
(map shepherd-service-provision load)))))
(test-end)