guix-commits
[Top][All Lists]
Advanced

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

branch master updated: Fix a regression with running sqitch


From: Christopher Baines
Subject: branch master updated: Fix a regression with running sqitch
Date: Sun, 11 Jul 2021 07:41:21 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository data-service.

The following commit(s) were added to refs/heads/master by this push:
     new d1a2a71  Fix a regression with running sqitch
d1a2a71 is described below

commit d1a2a7125cc15d6d1d8d41e2e8394493e963e5fa
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sun Jul 11 12:40:48 2021 +0100

    Fix a regression with running sqitch
    
    Introduced in 0dc05982cde052c985bb440dc026cbe3334ee50b.
---
 guix-data-service/config.scm.in | 2 +-
 scripts/guix-data-service.in    | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/guix-data-service/config.scm.in b/guix-data-service/config.scm.in
index 9941fca..22c399e 100644
--- a/guix-data-service/config.scm.in
+++ b/guix-data-service/config.scm.in
@@ -57,7 +57,7 @@
            (sqitch-plan . ,(let ((installed-plan
                                   
"@prefix@/share/guix-data-service/sqitch/sqitch.plan")
                                  (dev-plan
-                                  (string-append (getcwd) 
"/sqitch/sqitch.plan")))
+                                  "@abs_top_builddir@/sqitch/sqitch.plan"))
                              (if (file-exists? installed-plan)
                                  installed-plan
                                  dev-plan)))
diff --git a/scripts/guix-data-service.in b/scripts/guix-data-service.in
index 33cf2b5..7eae735 100644
--- a/scripts/guix-data-service.in
+++ b/scripts/guix-data-service.in
@@ -141,7 +141,13 @@
            (list (%config 'sqitch)
                  "deploy"
                  "--db-client" (%config 'sqitch-psql)
-                 "--chdir" (dirname (dirname (%config 'sqitch-plan)))
+                 ;; For some reason, sqitch behaves differently when the
+                 ;; guix-data-service is packaged, and when it's not, so try
+                 ;; and hack around this here.
+                 "--chdir" (let ((base (dirname (%config 'sqitch-plan))))
+                             (if (string-prefix? "/gnu" (%config 'sqitch-plan))
+                                 base
+                                 (dirname base)))
                  "--plan-file" (%config 'sqitch-plan)
                  "--mode" "change"      ; this helps when migrations don't
                                         ; have the revert bit implemented



reply via email to

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