summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-01-31 23:24:10 +0100
committerLudovic Courtès <ludo@gnu.org>2013-01-31 23:24:40 +0100
commit0f5378ebc4096b1d536f75c9867454215e8e06d6 (patch)
tree9cc4f32f2b09ca78993fc378198b2e999e80fd7e
parentdc2e4b0e161c33b9527993c3af7d0c269f9665d2 (diff)
downloadguix-0f5378ebc4096b1d536f75c9867454215e8e06d6.tar.gz
guix-package: Reduce start-up time for queries.
* guix-package.in (guix-package): Call `open-connection' and
  `package-derivation' only after `process-query' has returned.
-rw-r--r--guix-package.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/guix-package.in b/guix-package.in
index ab0191faa2..053f8fbf83 100644
--- a/guix-package.in
+++ b/guix-package.in
@@ -604,9 +604,9 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
   (setvbuf (current-error-port) _IOLBF)
 
   (let ((opts (parse-options)))
-    (parameterize ((%store (open-connection)))
-      (with-error-handling
-        (or (process-query opts)
+    (or (process-query opts)
+        (parameterize ((%store (open-connection)))
+          (with-error-handling
             (parameterize ((%guile-for-build
                             (package-derivation (%store)
                                                 (if (assoc-ref opts 'bootstrap?)