Add (guix cache) and use it in (guix scripts substitute).
authorLudovic Courtès <ludo@gnu.org>
Tue, 18 Apr 2017 20:07:49 +0000 (22:07 +0200)
committerLudovic Courtès <ludo@gnu.org>
Tue, 18 Apr 2017 21:19:30 +0000 (23:19 +0200)
commit2ea2aac6e9d58a07c029504f94fb5015cd407e31
tree28bb3ebe5f80fdcf84ca9464857c6f39754aaa2f
parent00753f7038234a0f5a79be3ec9ab949840a18743
Add (guix cache) and use it in (guix scripts substitute).

* guix/cache.scm, tests/cache.scm: New files.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* guix/scripts/substitute.scm (obsolete?): Remove.
(remove-expired-cached-narinfos): Rename to...
(cached-narinfo-expiration-time): ... this.  Remove the removal part and
only keep the expiration time part.
(narinfo-cache-directories): Add optional 'directory' parameter and
honor it.
(maybe-remove-expired-cached-narinfo): Remove.
(cached-narinfo-files): New procedure.
(guix-substitute): Use 'maybe-remove-expired-cache-entries' instead of
'maybe-remove-expired-cached-narinfo'.
Makefile.am
guix/cache.scm [new file with mode: 0644]
guix/scripts/substitute.scm
tests/cache.scm [new file with mode: 0644]