Subject: [bug#31618] [PATCH 0/4] Merge the beginning of the 'guile-daemon' branch

From: Ludovic Courtès <[email-masked]>
Date: Mon, 28 May 2018 12:27:36 +0200

Hello Guix!

These patches merge the beginning of reepca’s work on the Guile
implementation of the build daemon from last year’s GSoC.  It
is based on these commits by reepca:

   a647f6e74 deduplication: new module.
   b418ff86b guix: register-path: return #t on success.
   6b979a819 guix: register-path: do deduplication.
   374281f52 guix: register-path: reset timestamps after registering.
   b6d9b2675 guix: register-path: use new %store-database-directory
   4d945be54 guix: sql.scm: split into generic and store-specific parts.
   70cbb8c81 .dir-locals.el: properly indent sql macros.
   bcacbdfd2 guix: register-path: Honor environment variables.
   654c8a776 guix: register-path: Implement prototype in scheme.

I modified things in several ways:

  • Added configury to detect Guile-SQLite3 and make it an optional
    dependency.

  • Moved all the sqlite3-dependent code to (guix store database) so
    that it can really be optional; in reepca’s branch part of it was
    directly in (guix store).

  • Removed (guix sql).  Most of what it provided is now available in
    guile-sqlite3 proper, so I adjusted (guix store database) to take
    advantage of that.

  • Added tests for (guix store database) and (guix store
    deduplication), which allowed me to fix a couple of bugs.

The next step is to start using this internally in lieu of the
‘guix-register’ command.

At some point, we’ll have to make Guile-SQLite3 a mandatory dependency.
It would be nice if someone would take care of making proper releases of
it.  :-)  Any takers?  Danny?

BTW, kudos to you reepca for the nice code!

Thanks,
Ludo’.

Caleb Ristvedt (2):
  Add (gnu store database).
  Add (guix store deduplication).

Ludovic Courtès (2):
  build: Check for Guile-SQLite3.
  database: 'register-path' resets timestamps.

 .dir-locals.el                |   2 +
 Makefile.am                   |  19 +++
 configure.ac                  |   5 +
 guix/config.scm.in            |   6 +
 guix/self.scm                 |   9 +-
 guix/store/database.scm       | 234 ++++++++++++++++++++++++++++++++++
 guix/store/deduplication.scm  | 148 +++++++++++++++++++++
 m4/guix.m4                    |  18 +++
 tests/store-database.scm      |  54 ++++++++
 tests/store-deduplication.scm |  64 ++++++++++
 10 files changed, 558 insertions(+), 1 deletion(-)
 create mode 100644 guix/store/database.scm
 create mode 100644 guix/store/deduplication.scm
 create mode 100644 tests/store-database.scm
 create mode 100644 tests/store-deduplication.scm

-- 
2.17.0