summaryrefslogtreecommitdiff
path: root/guix/ui.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-07-01 00:29:22 +0200
committerLudovic Courtès <ludo@gnu.org>2013-07-01 00:30:44 +0200
commit1a8b783470416e37e2adc9bb94c709468233fe23 (patch)
tree9631afa9de239de6ffb88d23d5f5335176219f35 /guix/ui.scm
parenta4572a17202b061c792f2be216a9822df3440fe4 (diff)
downloadgnu-guix-1a8b783470416e37e2adc9bb94c709468233fe23.tar
gnu-guix-1a8b783470416e37e2adc9bb94c709468233fe23.tar.gz
ui: Don't make substituter-related RPCs at all when substitutes are disabled.
Reported by Nikita Karetnikov and Cyril Roelandt. * guix/ui.scm (show-what-to-build): Call `substitutable-path-info' only when USE-SUBSTITUTES? is true.
Diffstat (limited to 'guix/ui.scm')
-rw-r--r--guix/ui.scm15
1 files changed, 9 insertions, 6 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 370b41b9dc..fd35c6a8c8 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -223,12 +223,15 @@ available for download."
drv)
(map derivation-input-path build))))
((download) ; add the references of DOWNLOAD
- (delete-duplicates
- (append download
- (remove (cut valid-path? store <>)
- (append-map
- substitutable-references
- (substitutable-path-info store download)))))))
+ (if use-substitutes?
+ (delete-duplicates
+ (append download
+ (remove (cut valid-path? store <>)
+ (append-map
+ substitutable-references
+ (substitutable-path-info store
+ download)))))
+ download)))
(if dry-run?
(begin
(format (current-error-port)