Desperately I tried also adding fsync, to no avail, both issues remain.
Non-working patch attached.

Maybe dynamic-wind is an inappropriate pattern here?

If I interrupt installation using Ctrl-C (which I normally don’t,
instead I unplug Ethernet), then I have to press Ctrl-C twice.  Maybe
that could be related to why I need to resume twice?

I’m in the dark.

Regards,
Florian

does not help

diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm
index 5f720f6641..f5935a29c9 100644
--- a/gnu/installer/final.scm
+++ b/gnu/installer/final.scm
@@ -201,6 +201,12 @@ (define (assert-exit x)
              (stop-service 'guix-daemon)
              (copy-file database-file saved-database)
 
+             ;; Sync it to the filesystem.
+             (let* ((flags O_RDONLY)
+                    (fd (open saved-database flags)))
+               (fsync fd)
+               (close fd))
+
              (mount-cow-store (%installer-target-dir) backing-directory))
            (lambda ()
              ;; We need to drag the guix-daemon to the container MNT
@@ -218,8 +224,16 @@ (define (assert-exit x)
              ;; alive.
              (stop-service 'guix-daemon)
 
-             ;; Restore the database and restart it.
+             ;; Restore the database.
              (copy-file saved-database database-file)
+
+             ;; Sync it to the filesystem.
+             (let* ((flags O_RDONLY)
+                    (fd (open database-file flags)))
+               (fsync fd)
+               (close fd))
+
+             ;; And restart guix-daemon.
              (start-service 'guix-daemon)
 
              ;; Finally umount the cow-store and exit the container.

Reply via email to