substitute-binary: Add a local cache.
authorLudovic Courtès <ludo@gnu.org>
Mon, 15 Apr 2013 21:42:27 +0000 (23:42 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 15 Apr 2013 21:42:55 +0000 (23:42 +0200)
commiteba783b7b20cbf84dfd0a04bc19e3bebbc9a30fc
tree7455d6c1275c168677ae25eb43f815641af22f43
parent63b7c6c1f82486604abd6e3b6a6e14643d1f6621
substitute-binary: Add a local cache.

* guix/scripts/substitute-binary.scm (%narinfo-cache-directory,
  %narinfo-ttl, %narinfo-negative-ttl): New variables.
  (with-atomic-file-output, object->fields, read-narinfo,
  write-narinfo, narinfo->string, string->narinfo, lookup-narinfo): New
  procedures.
  (fetch-narinfo): Adjust to use `read-narinfo'.
  (guix-substitute-binary): Ensure the existence of
  %NARINFO-CACHE-DIRECTORY.  Use `lookup-narinfo' instead of
  `fetch-narinfo'.
guix/scripts/substitute-binary.scm
test-env.in
tests/store.scm