summary refs log tree commit diff
path: root/gnu/services/herd.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-05-27 19:29:33 +0200
committerLudovic Courtès <ludo@gnu.org>2023-05-30 00:15:29 +0200
commitd23d8fcee99e7b127f9e649925caca9cf0d36e76 (patch)
treeba8afbcf1f009c28aa291eb9c71d11c8b2e5e81b /gnu/services/herd.scm
parente91ceece76a37b9e1470b053c2d0880ac0eb1c2d (diff)
downloadguix-d23d8fcee99e7b127f9e649925caca9cf0d36e76.tar.gz
services: herd: "Resolve" transient services only when needed.
This allows us to get rid of the "eval root" actions, which in turn
would lead to confusing "Evaluating user expression" messages.

Fixes <https://issues.guix.gnu.org/55857>.

* gnu/services/herd.scm (resolve-transients): In 'values', avoid
'eval-there' call when UNRESOLVED is empty.
Diffstat (limited to 'gnu/services/herd.scm')
-rw-r--r--gnu/services/herd.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm
index 48594015fc..c24a403935 100644
--- a/gnu/services/herd.scm
+++ b/gnu/services/herd.scm
@@ -242,12 +242,13 @@ service is transient."
   ;; for all of SERVICES.
   (let* ((unresolved (filter (compose unspecified? live-service-transient?)
                              services))
-         (values     (or (eval-there
-                          `(and (defined? 'transient?) ;shepherd >= 0.9.0
-                                (map (compose transient? lookup-running)
-                                     ',(map (compose first
-                                                     live-service-provision)
-                                            unresolved))))
+         (values     (or (and (pair? unresolved)
+                              (eval-there
+                               `(and (defined? 'transient?) ;shepherd >= 0.9.0
+                                     (map (compose transient? lookup-running)
+                                          ',(map (compose first
+                                                          live-service-provision)
+                                                 unresolved)))))
                          (make-list (length unresolved) #f)))
          (resolved   (map (lambda (unresolved transient?)
                             (cons unresolved