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.
This commit is contained in:
Ludovic Courtès 2013-01-31 23:24:10 +01:00
parent dc2e4b0e16
commit 0f5378ebc4
1 changed files with 3 additions and 3 deletions

View File

@ -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?)