diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-06-18 11:51:44 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-06-18 14:48:17 +0200 |
commit | 97a46055ca9f72986740c26a5406b5138176ca61 (patch) | |
tree | 24a14640b53264a24151b6c9e895d4f51d4ce078 /gnu/build/image.scm | |
parent | f9a0fc9dbbfcdf28c77fd9199e3f1a73d901199c (diff) |
database: 'register-items' takes an open database.
* guix/store/database.scm (store-database-directory)
(store-database-file): New procedures.
(call-with-database): Add call to 'mkdir-p'.
(register-items): Add 'db' parameter and remove #:state-directory and #:schema.
(register-path): Use 'store-database-file' and 'with-database', and
parameterize SQL-SCHEMA.
* gnu/build/image.scm (register-closure): Likewise.
* gnu/build/vm.scm (register-closure): Likewise.
* guix/scripts/pack.scm (store-database)[build]: Likewise.
Diffstat (limited to 'gnu/build/image.scm')
-rw-r--r-- | gnu/build/image.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gnu/build/image.scm b/gnu/build/image.scm index 893b846976..e8df5866a7 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -137,12 +137,13 @@ produced by #:references-graphs.. As a side effect, if RESET-TIMESTAMPS? is true, reset timestamps on store files and, if DEDUPLICATE? is true, deduplicates files common to CLOSURE and the rest of PREFIX." (let ((items (call-with-input-file closure read-reference-graph))) - (register-items items - #:prefix prefix - #:deduplicate? deduplicate? - #:reset-timestamps? reset-timestamps? - #:registration-time %epoch - #:schema schema))) + (parameterize ((sql-schema schema)) + (with-database (store-database-file #:prefix prefix) db + (register-items db items + #:prefix prefix + #:deduplicate? deduplicate? + #:reset-timestamps? reset-timestamps? + #:registration-time %epoch))))) (define* (initialize-efi-partition root #:key |