From 1a8b783470416e37e2adc9bb94c709468233fe23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 1 Jul 2013 00:29:22 +0200 Subject: [PATCH] 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. --- guix/ui.scm | 15 +++++++++------ 1 file 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)