diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-12-10 21:42:02 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-12-15 17:32:11 +0100 |
commit | 0793833c59e727d5d471fe46c8e0e44c811b9621 (patch) | |
tree | b8dd7d4ab27051e8a24299ffab3fc84091df488a /guix/store | |
parent | 2aa512ec2843991804b5bf345c80abdb2b993bdc (diff) |
database: Remove #:deduplicate? from 'register-items'.
It is now up to the caller to deduplicate store contents.
* guix/store/database.scm (register-items): Remove #:deduplicate?
parameter and call to 'deduplicate'.
(register-path): Call 'deduplicate' when #:deduplicate? is true.
* gnu/build/image.scm (register-closure): Adjust call accordingly.
* gnu/build/vm.scm (register-closure): Likewise.
* guix/nar.scm (finalize-store-file): Likewise.
* guix/scripts/pack.scm (store-database): Likewise.
Diffstat (limited to 'guix/store')
-rw-r--r-- | guix/store/database.scm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/guix/store/database.scm b/guix/store/database.scm index 0ed66a6e2c..31ea9add78 100644 --- a/guix/store/database.scm +++ b/guix/store/database.scm @@ -407,6 +407,11 @@ by adding it as a temp-root." (define real-file-name (string-append (or prefix "") path)) + (when deduplicate? + (deduplicate real-file-name (nar-sha256 real-file-name) + #:store (string-append (or prefix "") + %store-directory))) + (when reset-timestamps? (reset-timestamps real-file-name)) @@ -414,7 +419,6 @@ by adding it as a temp-root." (with-database db-file db (register-items db (list (store-info path deriver references)) #:prefix prefix - #:deduplicate? deduplicate? #:log-port (%make-void-port "w"))))) (define %epoch @@ -423,7 +427,6 @@ by adding it as a temp-root." (define* (register-items db items #:key prefix - (deduplicate? #t) registration-time (log-port (current-error-port))) "Register all of ITEMS, a list of <store-info> records as returned by @@ -467,9 +470,7 @@ typically by adding them as temp-roots." "sha256:" (bytevector->base16-string hash)) #:nar-size nar-size - #:time registration-time))) - (when deduplicate? - (deduplicate real-file-name hash #:store store-dir))))) + #:time registration-time)))))) (let* ((prefix (format #f "registering ~a items" (length items))) (progress (progress-reporter/bar (length items) |