Brian Cully f66fa5f917
gnu: services: Revert to deleting and updating all matching services
This patch reverts the behavior introduced in
181951207339508789b28ba7cb914f983319920f which caused ‘modify-services’
clauses to only match a single instance of a service.

We will now match all service instances when doing a deletion or update, while
still raising an exception when trying to match against a service that does
not exist in the services list, or which was deleted explicitly by a ‘delete’
clause (or an update clause that returns ‘#f’ for the service).

Fixes: #64106

* gnu/services.scm (%modify-services): New procedure.
(modify-services): Use it.
(apply-clauses): Add DELETED-SERVICES argument, change to modify one service
at a time.
* tests/services.scm
("modify-services: delete then modify")
("modify-services: modify then delete")
("modify-services: delete multiple services of the same type")
("modify-services: modify multiple services of the same type"): New tests.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-08-31 23:31:50 -04:00
..
2022-05-22 01:07:52 +02:00
2022-11-11 23:17:42 +01:00
2021-09-28 22:00:47 +02:00
2022-11-11 23:17:42 +01:00
2023-06-18 23:44:29 +02:00
2023-06-09 14:19:14 +02:00
2021-12-23 10:54:00 +01:00
2023-07-18 16:56:06 -04:00
2022-09-29 22:59:48 +02:00
2023-02-19 21:13:23 -05:00
2023-05-18 20:01:32 +02:00