From 1574bd82bb36ee64574912c3e8855f94a73adc44 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès 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'. --- guix/store/database.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'guix/store') diff --git a/guix/store/database.scm b/guix/store/database.scm index c0010b72b9..9d5bc531bb 100644 --- a/guix/store/database.scm +++ b/guix/store/database.scm @@ -39,6 +39,7 @@ #:export (sql-schema %default-database-file store-database-file + call-with-database with-database path-id sqlite-register -- cgit v1.2.3