~ruther/guix-local

614c2188420a266ec512c9c04af3bb2ea46c4dc4 — Ludovic Courtès 11 years ago 2c74fde
substitute: Rename cache directory from "substitute-binary" to "substitute".

* guix/scripts/substitute.scm (%narinfo-cache-directory): Change
  "substitute-binary" to "substitute".
* tests/store.scm ("substitute query"): Likewise.
* tests/substitute.scm (call-with-narinfo): Likewise.
3 files changed, 4 insertions(+), 4 deletions(-)

M guix/scripts/substitute.scm
M tests/store.scm
M tests/substitute.scm
M guix/scripts/substitute.scm => guix/scripts/substitute.scm +2 -2
@@ 69,8 69,8 @@
(define %narinfo-cache-directory
  ;; A local cache of narinfos, to avoid going to the network.
  (or (and=> (getenv "XDG_CACHE_HOME")
             (cut string-append <> "/guix/substitute-binary"))
      (string-append %state-directory "/substitute-binary/cache")))
             (cut string-append <> "/guix/substitute"))
      (string-append %state-directory "/substitute/cache")))

(define %allow-unauthenticated-substitutes?
  ;; Whether to allow unchecked substitutes.  This is useful for testing

M tests/store.scm => tests/store.scm +1 -1
@@ 372,7 372,7 @@
        ;; Remove entry from the local cache.
        (false-if-exception
         (delete-file (string-append (getenv "XDG_CACHE_HOME")
                                     "/guix/substitute-binary/"
                                     "/guix/substitute/"
                                     (store-path-hash-part o))))

        ;; Make sure 'guix substitute' correctly communicates the above

M tests/substitute.scm => tests/substitute.scm +1 -1
@@ 132,7 132,7 @@ a file for NARINFO."
                                                "GUIX_BINARY_SUBSTITUTE_URL"))
                                  uri-path))
        (cache-directory   (string-append (getenv "XDG_CACHE_HOME")
                                          "/guix/substitute-binary/")))
                                          "/guix/substitute/")))
    (dynamic-wind
      (lambda ()
        (when (file-exists? cache-directory)