grafts: Update the narinfo cache before building a derivation.

* guix/grafts.scm (references-oracle)[references*]: Add call to
'substitution-oracle'.
This commit is contained in:
Ludovic Courtès 2016-03-14 22:49:51 +01:00
parent 026ca50fa4
commit 264fdedb40
1 changed files with 6 additions and 0 deletions

View File

@ -189,6 +189,12 @@ available."
(guard (c ((nix-protocol-error? c)
;; As a last resort, build DRV and query the references of the
;; build result.
;; Warm up the narinfo cache, otherwise each derivation build
;; will result in one HTTP request to get one narinfo, which is
;; much less efficient than fetching them all upfront.
(substitution-oracle store (list drv))
(and (build-derivations store (list drv))
(map (cut references store <>) items))))
(references/substitutes store items)))