From a4678c6ba18d8dbd79d931f80426eebf61be7ebe Mon Sep 17 00:00:00 2001 From: Caleb Ristvedt Date: Wed, 30 Jan 2019 17:03:38 -0600 Subject: database: Make 'register-items' transactional. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/store/database.scm (SQLITE_BUSY, register-output-sql): New variables. (add-references): Don't try finalizing after each use, only after all the uses (otherwise a finalized statement would be used if #:cache? was #f). (call-with-transaction): New procedure. (register-items): Use call-with-transaction to prevent broken intermediate states from being visible. * .dir-locals.el (call-with-transaction): indent it. Signed-off-by: Ludovic Courtès --- .dir-locals.el | 1 + 1 file changed, 1 insertion(+) (limited to '.dir-locals.el') diff --git a/.dir-locals.el b/.dir-locals.el index 593c767d2b..550e06ef09 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -79,6 +79,7 @@ (eval . (put 'with-extensions 'scheme-indent-function 1)) (eval . (put 'with-database 'scheme-indent-function 2)) + (eval . (put 'call-with-transaction 'scheme-indent-function 2)) (eval . (put 'call-with-container 'scheme-indent-function 1)) (eval . (put 'container-excursion 'scheme-indent-function 1)) -- cgit v1.2.3