guix-commits
[Top][All Lists]
Advanced

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

02/02: home-services: run-on-change: Handle first generation case.


From: guix-commits
Subject: 02/02: home-services: run-on-change: Handle first generation case.
Date: Tue, 31 Aug 2021 10:23:22 -0400 (EDT)

wigust pushed a commit to branch wip-guix-home
in repository guix.

commit 0c7bb26435513a61814d98af1c790e43a74afb6e
Author: Andrew Tropin <andrew@trop.in>
AuthorDate: Tue Aug 31 15:24:25 2021 +0300

    home-services: run-on-change: Handle first generation case.
    
    * gnu/home-services.scm
    (compute-on-change-gexp): Handle first generation case.
    
    Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
---
 gnu/home-services.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index 2a77349..5608c65 100644
--- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -448,13 +448,14 @@ with one gexp, but many times, and all gexps must be 
idempotent.")))
              (if any-changes? (cadr x) "")))
          '#$pattern-gexp-tuples))
 
-      (if #$eval-gexps?
+      (if (and #$eval-gexps? (getenv "GUIX_OLD_HOME"))
           (begin
             (display "Evaling on-change gexps.\n\n")
             (for-each primitive-eval expressions-to-eval)
             (display "On-change gexps evaluation finished.\n\n"))
           (display "\
-On-change gexps won't evaluated, disabled by service configuration.\n"))))
+On-change gexps won't evaluated, disabled by service configuration or
+there are no previos generations.\n"))))
 
 (define home-run-on-change-service-type
   (service-type (name 'home-run-on-change)



reply via email to

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