diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-06-18 11:58:41 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-06-18 14:48:17 +0200 |
commit | d7fb5538013710288e91657499f0e04207115776 (patch) | |
tree | ed2da2ae3887c2b2f1342a74a1fe0ce49cb80a14 /guix/nar.scm | |
parent | 97a46055ca9f72986740c26a5406b5138176ca61 (diff) |
nar: Avoid opening the database an additional time.
* guix/nar.scm (finalize-store-file): Call 'register-items' and pass it
DB. This avoids opening the database a second time and hopefully
reduces contention on 'db.sqlite-shm'.
Diffstat (limited to 'guix/nar.scm')
-rw-r--r-- | guix/nar.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/nar.scm b/guix/nar.scm index eff4becbce..16dfe28766 100644 --- a/guix/nar.scm +++ b/guix/nar.scm @@ -27,6 +27,7 @@ ;; (guix store) since this is "daemon-side" code. #:use-module (guix store) #:use-module (guix store database) + #:use-module ((guix build store-copy) #:select (store-info)) #:use-module (guix ui) ; for '_' #:use-module (gcrypt hash) @@ -115,9 +116,8 @@ held." ;; Register TARGET. As a side effect, it resets the timestamps of all ;; its files, recursively, and runs a deduplication pass. - (register-path target - #:references references - #:deriver deriver)) + (register-items db + (list (store-info target deriver references)))) (when lock? (delete-file (string-append target ".lock")) |