[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: services: herd: Remove workaround for Shepherd < 0.5.0.
From: |
guix-commits |
Subject: |
02/06: services: herd: Remove workaround for Shepherd < 0.5.0. |
Date: |
Sun, 26 Mar 2023 17:36:09 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 547965aa27b6a09cadf42130b7ec7db3f1aee61f
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Mar 24 19:22:39 2023 +0100
services: herd: Remove workaround for Shepherd < 0.5.0.
* gnu/services/herd.scm (load-services/safe): Remove workaround for
Shepherd < 0.5.0, released in 2018.
---
gnu/services/herd.scm | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm
index a7c845b4b0..e489ce2b9a 100644
--- a/gnu/services/herd.scm
+++ b/gnu/services/herd.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016-2019, 2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016-2019, 2022-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -284,22 +284,12 @@ returns a shepherd <service> object."
(define (load-services/safe files)
"This is like 'load-services', but make sure only the subset of FILES that
-can be safely reloaded is actually reloaded.
-
-This is done to accommodate the Shepherd < 0.15.0 where services lacked the
-'replacement' slot, and where 'register-services' would throw an exception
-when passed a service with an already-registered name."
- (eval-there `(let* ((services (map primitive-load ',files))
- (slots (map slot-definition-name
- (class-slots <service>)))
- (can-replace? (memq 'replacement slots)))
- (define (registered? service)
- (not (null? (lookup-services (canonical-name service)))))
-
- (apply register-services
- (if can-replace?
- services
- (remove registered? services))))))
+can be safely reloaded is actually reloaded."
+ (eval-there `(let ((services (map primitive-load ',files)))
+ ;; Since version 0.5.0 of the Shepherd, registering a service
+ ;; that has the same name as an already-registered service
+ ;; makes it a "replacement" of that previous service.
+ (apply register-services services))))
(define* (start-service name #:optional (arguments '()))
(invoke-action name 'start arguments
- branch master updated (9ec1af39e2 -> c06b6ce257), guix-commits, 2023/03/26
- 05/06: gnu: haproxy: Update to 2.7.5., guix-commits, 2023/03/26
- 01/06: doc: Properly document 'replace' clause of 'modify-inputs'., guix-commits, 2023/03/26
- 06/06: gnu: haproxy: Move to (gnu packages high-availability)., guix-commits, 2023/03/26
- 03/06: gnu: chez-scheme-for-racket-bootstrap-bootfiles: change for aarch64., guix-commits, 2023/03/26
- 02/06: services: herd: Remove workaround for Shepherd < 0.5.0.,
guix-commits <=
- 04/06: tests: Fix guix-home.sh when guix isn't installed, guix-commits, 2023/03/26