diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-01-10 00:39:59 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-01-10 00:39:59 +0100 |
commit | e9651e39b315035eb9e87888155f8d6e33ef0567 (patch) | |
tree | 55f76cd433d53d58130e654ae949977d787ced55 /tests/derivations.scm | |
parent | 0b6af195fe7476a15e498b24c67f9d8f6080a400 (diff) | |
download | guix-e9651e39b315035eb9e87888155f8d6e33ef0567.tar guix-e9651e39b315035eb9e87888155f8d6e33ef0567.tar.gz |
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?.
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r-- | tests/derivations.scm | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ (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*) |