Ludovic Courtès 1819512073
services: 'modify-services' preserves service ordering.
Fixes <https://issues.guix.gnu.org/63921>.

The regression was introduced in
dbbc7e946131ba257728f1d05b96c4339b7ee88b, which changed the order of
services.  As a result, someone using 'modify-services' could find
themselves with incorrect ordering of expressions in the "boot" script,
whereby the cleanup expressions would come after (execl ".../shepherd").
This, in turn, would lead shepherd to error out at boot with EADDRINUSE
on /var/run/shepherd/socket.

* gnu/services.scm (%delete-service, %apply-clauses): Remove.
(clause-alist): New macro.
(apply-clauses): New procedure.
(modify-services): Use it.  Adjust docstring.
* tests/services.scm ("modify-services: do nothing"): Remove 'sort' call.
("modify-services: delete service"): Likewise, and add 't4' service.
("modify-services: change value"): Remove 'sort' call and fix expected value.
2023-06-06 11:54:39 +02:00
..
2022-05-22 01:07:52 +02:00
2022-11-11 23:17:42 +01:00
2022-11-11 23:17:42 +01:00
2021-12-23 10:54:00 +01: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