summary refs log tree commit diff
path: root/tests/style.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-06-06 11:41:39 +0200
committerLudovic Courtès <ludo@gnu.org>2023-06-06 11:54:39 +0200
commit181951207339508789b28ba7cb914f983319920f (patch)
treea9747a37eb4fa7cf7dadb481df64b7856644ca0e /tests/style.scm
parentdc0c5d56ee04d8a2b57f316be7f95b9aca244ab5 (diff)
downloadguix-181951207339508789b28ba7cb914f983319920f.tar.gz
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.
Diffstat (limited to 'tests/style.scm')
0 files changed, 0 insertions, 0 deletions