diff --git a/gnu/build/image.scm b/gnu/build/image.scm index 8d5fc603d9..f6e5cb42f6 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -151,7 +151,6 @@ (define* (register-closure prefix closure #:wal-mode? wal-mode? (register-items db items #:prefix prefix - #:deduplicate? #f #:registration-time %epoch))))) (define* (initialize-efi-partition root diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 8c6ab648ac..bd59916bf3 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -224,7 +224,6 @@ (define* (register-closure prefix closure (with-database (store-database-file #:prefix prefix) db (register-items db items #:prefix prefix - #:deduplicate? #f #:registration-time %epoch))))) diff --git a/guix/nar.scm b/guix/nar.scm index 947b393d84..a817b56007 100644 --- a/guix/nar.scm +++ b/guix/nar.scm @@ -118,8 +118,7 @@ (define (acquire-lock file) ;; Register TARGET. The 'restore-file' call took care of ;; deduplication, timestamps, and permissions. (register-items db - (list (store-info target deriver references)) - #:deduplicate? #f)) + (list (store-info target deriver references)))) (when lock? (delete-file (string-append target ".lock")) diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 440c4b0903..8ecdcb823f 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -167,7 +167,6 @@ (define db-file (let ((items (append-map read-closure '#$labels))) (with-database db-file db (register-items db items - #:deduplicate? #f #:registration-time %epoch))))))) (computed-file "store-database" build 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 @@ (define db-file (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 @@ (define real-file-name (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 @@ (define %epoch (define* (register-items db items #:key prefix - (deduplicate? #t) registration-time (log-port (current-error-port))) "Register all of ITEMS, a list of records as returned by @@ -467,9 +470,7 @@ (define real-file-name "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)