summaryrefslogtreecommitdiff
path: root/guix/store
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-12-11 14:46:20 +0100
committerLudovic Courtès <ludo@gnu.org>2020-12-15 17:32:11 +0100
commit3169c93903c20cea000335d59560eac7f28e8f92 (patch)
treed8b4014a1e81d5d2eabc41f2293341bbbe408308 /guix/store
parent1574bd82bb36ee64574912c3e8855f94a73adc44 (diff)
downloadguix-patches-3169c93903c20cea000335d59560eac7f28e8f92.tar
guix-patches-3169c93903c20cea000335d59560eac7f28e8f92.tar.gz
database: Remove 'register-path'.
* guix/store/database.scm (register-path): Remove. * tests/store-database.scm ("register-path"): Rename to... ("register-items"): ... this, and use 'register-items' instead of 'register-path'. ("register-path, directory"): Rename to... ("register-items, directory"): ... this, and use 'register-items' instead of 'register-path'. ("register-path with unregistered references"): Rename to... ("sqlite-register with unregistered references"): ... this.
Diffstat (limited to 'guix/store')
-rw-r--r--guix/store/database.scm27
1 files changed, 0 insertions, 27 deletions
diff --git a/guix/store/database.scm b/guix/store/database.scm
index 9d5bc531bb..4579b05261 100644
--- a/guix/store/database.scm
+++ b/guix/store/database.scm
@@ -43,7 +43,6 @@
with-database
path-id
sqlite-register
- register-path
register-items
%epoch
reset-timestamps))
@@ -383,32 +382,6 @@ is true."
(chmod file (if (executable-file? file) #o555 #o444)))
(utime file 1 1 0 0)))))
-(define* (register-path path
- #:key (references '()) deriver prefix
- state-directory
- (schema (sql-schema)))
- "Register PATH as a valid store file, with REFERENCES as its list of
-references, and DERIVER as its deriver (.drv that led to it.) If PREFIX is
-given, it must be the name of the directory containing the new store to
-initialize; if STATE-DIRECTORY is given, it must be a string containing the
-absolute file name to the state directory of the store being initialized.
-Return #t on success.
-
-Use with care as it directly modifies the store! This is primarily meant to
-be used internally by the daemon's build hook.
-
-PATH must be protected from GC and locked during execution of this, typically
-by adding it as a temp-root."
- (define db-file
- (store-database-file #:prefix prefix
- #:state-directory state-directory))
-
- (parameterize ((sql-schema schema))
- (with-database db-file db
- (register-items db (list (store-info path deriver references))
- #:prefix prefix
- #:log-port (%make-void-port "w")))))
-
(define %epoch
;; When it all began.
(make-time time-utc 0 1))