From e9651e39b315035eb9e87888155f8d6e33ef0567 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 10 Jan 2015 00:39:59 +0100 Subject: derivations: Add 'substitution-oracle' and use it. This makes 'guix environment PACKAGE' significantly faster when substitutes are enabled. Before that, it would lead to many invocations of 'guix substitute-binary', one per 'derivation-prerequisites-to-build' call. Now, all these are replaced by a single invocation. * guix/derivations.scm (derivation-output-paths, substitution-oracle): New procedures. (derivation-prerequisites-to-build): Replace #:use-substitutes? with #:substitutable?. Remove the local 'derivation-output-paths' and 'substitutable?'. * guix/ui.scm (show-what-to-build): Add 'substitutable?'. Pass it to 'derivation-prerequisites-to-build'. [built-or-substitutable?]: Use it instead of 'has-substitutes?'. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes"): Use #:substitutable? instead of #:use-substitutes?. --- tests/derivations.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/derivations.scm b/tests/derivations.scm index 25e6f75657..8e592ab6a1 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -589,7 +589,8 @@ (define %coreutils (derivation-prerequisites-to-build store drv)) ((build* download*) (derivation-prerequisites-to-build store drv - #:use-substitutes? #f))) + #:substitutable? + (const #f)))) (and (null? build) (equal? download (list output)) (null? download*) -- cgit v1.2.3