[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/11: grafts: Don't rely on substitute info for missing store items.
From: |
guix-commits |
Subject: |
06/11: grafts: Don't rely on substitute info for missing store items. |
Date: |
Sun, 29 Mar 2020 09:37:08 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 710854304b1ab29332edcb76f3de532e0724c197
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/cached' and 'build-derivations' right away instead.
---
guix/grafts.scm | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/guix/grafts.scm b/guix/grafts.scm
index adc7bfa..5173a77 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.
;;;
@@ -166,22 +166,14 @@ references. Call REFERENCES to get the list of
references."
(define (references-oracle store input)
"Return a one-argument procedure that, when passed the output file names of
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."
+references of that item. Build INPUT if it's not 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/cached store <>) items))))
+ (map (cut references/cached store <>) items)))
(let loop ((items (derivation-input-output-paths input))
(result vlist-null))
- branch master updated (3b1886c -> 033df23), guix-commits, 2020/03/29
- 01/11: store: Add 'map/accumulate-builds'., guix-commits, 2020/03/29
- 02/11: guix build: Use 'map/accumulate-builds'., guix-commits, 2020/03/29
- 03/11: gexp: 'lower-inputs' uses 'mapm/accumulate-builds'., guix-commits, 2020/03/29
- 04/11: profiles: Use 'mapm/accumulate-builds'., guix-commits, 2020/03/29
- 06/11: grafts: Don't rely on substitute info for missing store items.,
guix-commits <=
- 05/11: store: Add 'references/cached'., guix-commits, 2020/03/29
- 11/11: packages: Change 'guile-for-grafts' back to 2.0., guix-commits, 2020/03/29
- 09/11: gnu: Add guile3.0-websocket., guix-commits, 2020/03/29
- 08/11: services: shepherd: Mark '.go' derivations as non-substitutable., guix-commits, 2020/03/29
- 10/11: gnu: guile3.0-websocket: Install .go files in the right place., guix-commits, 2020/03/29
- 07/11: '--dry-run' no longer implies '--no-grafts'., guix-commits, 2020/03/29