diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-04-15 23:27:04 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-04-15 23:43:13 +0200 |
commit | e967678ed1f1d7e765adc4bfc7d2a79ee9677b21 (patch) | |
tree | 92f53d488cdc6b7c85a32f12c6e4415c7c840527 | |
parent | 0c357a088bb0b267df9d9bde486e6603f66cd029 (diff) | |
download | patches-e967678ed1f1d7e765adc4bfc7d2a79ee9677b21.tar patches-e967678ed1f1d7e765adc4bfc7d2a79ee9677b21.tar.gz |
substitute-binary: Skip servers that use a different store prefix.
* guix/scripts/substitute-binary.scm (fetch-narinfo): Return #f when
CACHE uses a store directory different from (%store-prefix).
-rwxr-xr-x | guix/scripts/substitute-binary.scm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/guix/scripts/substitute-binary.scm b/guix/scripts/substitute-binary.scm index 94cfac8bcc..804121b6c8 100755 --- a/guix/scripts/substitute-binary.scm +++ b/guix/scripts/substitute-binary.scm @@ -257,10 +257,11 @@ reading PORT." ;; list of key/value pairs. (false-if-exception (fetch (string->uri url)))) - (and=> (download (string-append (cache-url cache) "/" - (store-path-hash-part path) - ".narinfo")) - (cute read-narinfo <> (cache-url cache)))) + (and (string=? (cache-store-directory cache) (%store-prefix)) + (and=> (download (string-append (cache-url cache) "/" + (store-path-hash-part path) + ".narinfo")) + (cute read-narinfo <> (cache-url cache))))) (define (lookup-narinfo cache path) "Check locally if we have valid info about PATH, otherwise go to CACHE and |