guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/06: grafts: Don't rely on substitute info for missing store items.


From: guix-commits
Subject: 05/06: grafts: Don't rely on substitute info for missing store items.
Date: Wed, 25 Mar 2020 11:22:59 -0400 (EDT)

civodul pushed a commit to branch wip-build-accumulator
in repository guix.

commit ba982b240e1e44ab701201e975a142244d225c44
Author: Ludovic Courtès <address@hidden>
AuthorDate: Wed Mar 25 14:46:34 2020 +0100

    grafts: Don't rely on substitute info for missing store items.
    
    Fixes <https://bugs.gnu.org/22990>.
    
    * guix/grafts.scm (references-oracle)[references*]: Remove call to
    'substitution-oracle' and to 'references/substitutes'.  Use 'references'
    and 'build-derivations' right away instead.
---
 guix/grafts.scm | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/guix/grafts.scm b/guix/grafts.scm
index adc7bfa..0a80363 100644
--- a/guix/grafts.scm
+++ b/guix/grafts.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès 
<address@hidden>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès 
<address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -169,19 +169,12 @@ INPUT, a derivation input, or their dependencies, returns 
the list of
 references of that item.  Use either local info or substitute info; build
 INPUT if no information is available."
   (define (references* items)
+    ;; Return the references of ITEMS.
     (guard (c ((store-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 (derivation-input-derivation input)))
-
+               ;; ITEMS are not in store so build INPUT first.
                (and (build-derivations store (list input))
                     (map (cut references store <>) items))))
-      (references/substitutes store items)))
+      (map (cut references store <>) items)))
 
   (let loop ((items (derivation-input-output-paths input))
              (result vlist-null))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]