database: Allow for deterministic database construction.

Fixes <https://bugs.gnu.org/21073>.

* guix/store/database.scm (sqlite-register): Add #:time.
(%epoch): New variable.
(register-items): Add #:registration-time.  Pass #:time to
'sqlite-register'.
* gnu/build/install.scm (register-closure): Pass #:registration-time.
This commit is contained in:
Ludovic Courtès 2018-06-08 00:00:47 +02:00
parent 078c2329c0
commit eb9fe97495
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 17 additions and 5 deletions

View file

@ -158,6 +158,7 @@ deduplicates files common to CLOSURE and the rest of PREFIX."
#:prefix prefix
#:deduplicate? deduplicate?
#:reset-timestamps? reset-timestamps?
#:registration-time %epoch
#:schema schema)))
(define* (populate-single-profile-directory directory