aboutsummaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-01-14 18:28:46 +0100
committerLudovic Courtès <ludo@gnu.org>2015-01-14 18:28:46 +0100
commitdf5188ddfa0c004009c7fcb0ce09a27bb50b9a59 (patch)
treeaa50e64ca0b30ca2957fb17875f47323a87a43b0 /build-aux
parent619c9522b2d6d7c451f90524c3a041c5fb12c28e (diff)
downloadpatches-df5188ddfa0c004009c7fcb0ce09a27bb50b9a59.tar
patches-df5188ddfa0c004009c7fcb0ce09a27bb50b9a59.tar.gz
check-available-binaries: Use 'substitution-oracle'.
* build-aux/check-available-binaries.scm: Use 'substitution-oracle'. Changer caller and 'warn' accordingly.
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/check-available-binaries.scm20
1 files changed, 10 insertions, 10 deletions
diff --git a/build-aux/check-available-binaries.scm b/build-aux/check-available-binaries.scm
index ebe94d2f7f..7ac4352839 100644
--- a/build-aux/check-available-binaries.scm
+++ b/build-aux/check-available-binaries.scm
@@ -37,18 +37,18 @@
%bootstrap-tarballs <>)
'("mips64el-linux-gnuabi64")))
(total (append native cross)))
- (define (warn proc)
- (lambda (drv)
- (or (proc drv)
- (begin
- (format (current-error-port) "~a is not substitutable~%"
- drv)
- #f))))
+ (define (warn item system)
+ (format (current-error-port) "~a (~a) is not substitutable~%"
+ item system)
+ #f)
(set-build-options store #:use-substitutes? #t)
- (let ((result (every (compose (warn (cut has-substitutes? store <>))
- derivation->output-path)
- total)))
+ (let* ((substitutable? (substitution-oracle store total))
+ (result (every (lambda (drv)
+ (let ((out (derivation->output-path drv)))
+ (or (substitutable? out)
+ (warn out (derivation-system drv)))))
+ total)))
(when result
(format (current-error-port) "~a packages found substitutable~%"
(length total)))