From e967678ed1f1d7e765adc4bfc7d2a79ee9677b21 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 15 Apr 2013 23:27:04 +0200 Subject: 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). --- guix/scripts/substitute-binary.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'guix/scripts/substitute-binary.scm') 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 @@ (define (download url) ;; 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 -- cgit v1.2.3