From 1574bd82bb36ee64574912c3e8855f94a73adc44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 11 Dec 2020 12:36:52 +0100 Subject: system: 'init' does not recompute the hash of each store item. Fixes . Previously, the 'register-path' call would re-traverse ITEM to compute its nar hash, even though that hash is already known in the initial store. This patch also avoids repeated opening/closing of the database. * guix/store/database.scm (call-with-database): Export. * guix/scripts/system.scm (copy-item): Add 'db' parameter. Call 'sqlite-register' instead of 'register-path'. (copy-closure): Remove redundant call to 'references*'. Call 'call-with-database' and pass the database to 'copy-item'. --- .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 4eb27d8b1b..8f07a08eb5 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -121,6 +121,7 @@ (eval . (put 'let-system 'scheme-indent-function 1)) (eval . (put 'with-database 'scheme-indent-function 2)) + (eval . (put 'call-with-database 'scheme-indent-function 1)) (eval . (put 'call-with-transaction 'scheme-indent-function 1)) (eval . (put 'with-statement 'scheme-indent-function 3)) (eval . (put 'call-with-retrying-transaction 'scheme-indent-function 1)) -- cgit v1.2.3