[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/16: database: Remove #:deduplicate? from 'register-items'.
From: |
guix-commits |
Subject: |
10/16: database: Remove #:deduplicate? from 'register-items'. |
Date: |
Tue, 15 Dec 2020 11:33:00 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 0793833c59e727d5d471fe46c8e0e44c811b9621
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Dec 10 21:42:02 2020 +0100
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.
---
gnu/build/image.scm | 1 -
gnu/build/vm.scm | 1 -
guix/nar.scm | 3 +--
guix/scripts/pack.scm | 1 -
guix/store/database.scm | 11 ++++++-----
5 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index 8d5fc60..f6e5cb4 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -151,7 +151,6 @@ produced by #:references-graphs. Pass WAL-MODE? to
call-with-database."
#: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 8c6ab64..bd59916 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -224,7 +224,6 @@ produced by #:references-graphs."
(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 947b393..a817b56 100644
--- a/guix/nar.scm
+++ b/guix/nar.scm
@@ -118,8 +118,7 @@ held."
;; 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 440c4b0..8ecdcb8 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -167,7 +167,6 @@ dependencies are registered."
(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 0ed66a6..31ea9ad 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)
- branch master updated (1901873 -> 7530e49), guix-commits, 2020/12/15
- 02/16: serialization: 'fold-archive' notifies about directory processing completion., guix-commits, 2020/12/15
- 01/16: Revert "gnu: grub: Fix unicode font loading when booting over TFTP.", guix-commits, 2020/12/15
- 03/16: serialization: 'restore-file' sets canonical timestamp and permissions., guix-commits, 2020/12/15
- 07/16: database: Remove #:reset-timestamps? from 'register-items'., guix-commits, 2020/12/15
- 10/16: database: Remove #:deduplicate? from 'register-items'.,
guix-commits <=
- 06/16: image: 'register-closure' assumes already-reset timestamps., guix-commits, 2020/12/15
- 12/16: database: Remove #:deduplicate? and #:reset-timestamps? from 'register-path'., guix-commits, 2020/12/15
- 08/16: store-copy: 'populate-store' can optionally deduplicate files., guix-commits, 2020/12/15
- 04/16: nar: Deduplicate files right as they are restored., guix-commits, 2020/12/15
- 16/16: deduplicate: Create the '.links' directory lazily., guix-commits, 2020/12/15
- 05/16: store-copy: 'populate-store' resets timestamps., guix-commits, 2020/12/15
- 09/16: image: 'register-closure' leaves it up to the caller to deduplicate., guix-commits, 2020/12/15
- 15/16: database: Honor 'SOURCE_DATE_EPOCH'., guix-commits, 2020/12/15
- 13/16: system: 'init' does not recompute the hash of each store item., guix-commits, 2020/12/15
- 14/16: database: Remove 'register-path'., guix-commits, 2020/12/15