ui: Don't make substituter-related RPCs at all when substitutes are disabled.
authorLudovic Courtès <ludo@gnu.org>
Sun, 30 Jun 2013 22:29:22 +0000 (00:29 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sun, 30 Jun 2013 22:30:44 +0000 (00:30 +0200)
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

index 370b41b..fd35c6a 100644 (file)
@@ -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)