guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 07/08: squash! service: Use 'lookup-service' instead of 'look


From: Ludovic Courtès
Subject: [shepherd] 07/08: squash! service: Use 'lookup-service' instead of 'lookup-services'.
Date: Thu, 13 Apr 2023 05:43:12 -0400 (EDT)

civodul pushed a commit to branch wip-goopsless
in repository shepherd.

commit 174457fd95bdffce1218d811c3455a18b3a0c212
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Apr 12 21:56:15 2023 +0200

    squash! service: Use 'lookup-service' instead of 'lookup-services'.
    
    * modules/shepherd/service.scm (deregister-service): Likewise.
---
 modules/shepherd/service.scm | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index ffc9cd5..6c6b884 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -2420,10 +2420,10 @@ requested to be removed."
            #t)
           (else
            ;; Removing only one service.
-           (match (lookup-services name)
-             (()                                  ; unknown service
+           (match (lookup-service name)
+             (#f
               (raise (condition (&missing-service-error (name name)))))
-             ((service)                     ; only SERVICE provides NAME
+             (service
               ;; Are we removing a user service…
               (if (eq? (service-canonical-name service) name)
                   (local-output (l10n "Removing service '~a'...") name)
@@ -2432,11 +2432,7 @@ requested to be removed."
                    "Removing service '~a' providing '~a'..."
                    (service-canonical-name service) name))
               (deregister service)
-              (local-output (l10n "Done.")))
-             ((services ...)                      ; ambiguous NAME
-              (local-output
-               "Not unloading: '~a' names several services: '~a'."
-               name (map service-canonical-name services))))))))
+              (local-output (l10n "Done."))))))))
 
 (define (load-config file-name)
   (local-output (l10n "Loading ~a.") file-name)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]