summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-06-07 22:23:57 +0200
committerLudovic Courtès <ludo@gnu.org>2018-06-14 11:17:00 +0200
commit31a63be8784b2769c2db21388f788a8b975fd4e1 (patch)
treeeaff9fa1afe95c89d6123953ac4afbf61ed473dc /gnu
parentef1297e8c74a0358d2538a5dd43d50cde7bf14a3 (diff)
downloadguix-31a63be8784b2769c2db21388f788a8b975fd4e1.tar.gz
database: Add 'register-items'.
* guix/build/store-copy.scm (store-info): Export.
* guix/store/database.scm (register-items): New procedure.
(register-path): Implement in terms of 'register-items'.
* gnu/build/install.scm (register-closure): Use 'register-items' instead
of 'for-each' and 'register-path'.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/build/install.scm15
1 files changed, 5 insertions, 10 deletions
diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index 6cc678b44b..82eb63d726 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -169,16 +169,11 @@ 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)))
-    ;; TODO: Add a procedure to register all of ITEMS at once.
-    (for-each (lambda (item)
-                (register-path (store-info-item item)
-                               #:references (store-info-references item)
-                               #:deriver (store-info-deriver item)
-                               #:prefix prefix
-                               #:deduplicate? deduplicate?
-                               #:reset-timestamps? reset-timestamps?
-                               #:schema schema))
-              items)))
+    (register-items items
+                    #:prefix prefix
+                    #:deduplicate? deduplicate?
+                    #:reset-timestamps? reset-timestamps?
+                    #:schema schema)))
 
 (define* (populate-single-profile-directory directory
                                             #:key profile closure