mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
system: 'init' does not recompute the hash of each store item.
Fixes <https://bugs.gnu.org/44760>. 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'.
This commit is contained in:
parent
0682cc5936
commit
1574bd82bb
3 changed files with 34 additions and 27 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue