mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
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).
This commit is contained in:
parent
0c357a088b
commit
e967678ed1
1 changed files with 5 additions and 4 deletions
|
@ -257,10 +257,11 @@ (define (download url)
|
||||||
;; list of key/value pairs.
|
;; list of key/value pairs.
|
||||||
(false-if-exception (fetch (string->uri url))))
|
(false-if-exception (fetch (string->uri url))))
|
||||||
|
|
||||||
|
(and (string=? (cache-store-directory cache) (%store-prefix))
|
||||||
(and=> (download (string-append (cache-url cache) "/"
|
(and=> (download (string-append (cache-url cache) "/"
|
||||||
(store-path-hash-part path)
|
(store-path-hash-part path)
|
||||||
".narinfo"))
|
".narinfo"))
|
||||||
(cute read-narinfo <> (cache-url cache))))
|
(cute read-narinfo <> (cache-url cache)))))
|
||||||
|
|
||||||
(define (lookup-narinfo cache path)
|
(define (lookup-narinfo cache path)
|
||||||
"Check locally if we have valid info about PATH, otherwise go to CACHE and
|
"Check locally if we have valid info about PATH, otherwise go to CACHE and
|
||||||
|
|
Loading…
Reference in a new issue