mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 03:51:53 +02:00
database: 'with-database' can now initialize new databases.
* nix/libstore/schema.sql: Rename to...
* guix/store/schema.sql: ... this.
* Makefile.am (nobase_dist_guilemodule_DATA): Add it.
* nix/local.mk (%D%/libstore/schema.sql.hh): Adjust accordingly.
* guix/store/database.scm (sql-schema): New variable.
(sqlite-exec, initialize-database, call-with-database): New procedures.
(with-database): Rewrite in terms of 'call-with-database'.
* tests/store-database.scm ("new database"): New test.
* guix/self.scm (compiled-guix)[*core-modules*]: Add 'schema.sql' to
#:extra-files.
This commit is contained in:
+1
-1
@@ -163,7 +163,7 @@ noinst_HEADERS = \
|
||||
$(libformat_headers) $(libutil_headers) $(libstore_headers) \
|
||||
$(guix_daemon_headers)
|
||||
|
||||
%D%/libstore/schema.sql.hh: %D%/libstore/schema.sql
|
||||
%D%/libstore/schema.sql.hh: guix/store/schema.sql
|
||||
$(AM_V_GEN)$(GUILE) --no-auto-compile -c \
|
||||
"(use-modules (rnrs io ports)) \
|
||||
(call-with-output-file \"$@\" \
|
||||
|
||||
Reference in New Issue
Block a user