aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-03-14 22:49:51 +0100
committerLudovic Courtès <ludo@gnu.org>2016-03-14 23:34:33 +0100
commit264fdedb408ba3620d1e361de6c77e7925025301 (patch)
treea12b781beedaf5fcc652885f3622285aba14a013 /guix
parent026ca50fa4c46a8e280cd51621bbec76b12c0757 (diff)
downloadgnu-guix-264fdedb408ba3620d1e361de6c77e7925025301.tar
gnu-guix-264fdedb408ba3620d1e361de6c77e7925025301.tar.gz
grafts: Update the narinfo cache before building a derivation.
* guix/grafts.scm (references-oracle)[references*]: Add call to 'substitution-oracle'.
Diffstat (limited to 'guix')
-rw-r--r--guix/grafts.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/guix/grafts.scm b/guix/grafts.scm
index af469575db..6bec999ad2 100644
--- a/guix/grafts.scm
+++ b/guix/grafts.scm
@@ -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)))