summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-05-09 15:48:23 +0200
committerLudovic Courtès <ludo@gnu.org>2017-05-09 18:08:24 +0200
commit402e98c524a44f9b8c8e5da86f68ffbd854c6669 (patch)
treedd181de33446af8e6ae21f3050952847619a899d /guix/scripts
parent4902d3c4e0376974356481f222583580b49f39e1 (diff)
pull: Use 'with-store'.
* guix/scripts/pull.scm (guix-pull): Remove call to 'open-connection'. Use 'with-store' instead.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/pull.scm42
1 files changed, 21 insertions, 21 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 5ab95628b4..58b87d4df4 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -238,29 +238,29 @@ contained therein."
(with-error-handling
(let* ((opts (parse-command-line args %options
(list %default-options)))
- (store (open-connection))
(url (assoc-ref opts 'tarball-url)))
- (set-build-options-from-command-line store opts)
(unless (assoc-ref opts 'dry-run?) ;XXX: not very useful
- (let ((tarball
- (if (use-le-certs? url)
- (let* ((drv (package-derivation store le-certs))
- (certs (string-append (derivation->output-path drv)
- "/etc/ssl/certs")))
- (build-derivations store (list drv))
- (parameterize ((%x509-certificate-directory certs))
- (fetch-tarball store url)))
- (fetch-tarball store url))))
- (unless tarball
- (leave (G_ "failed to download up-to-date source, exiting\n")))
- (parameterize ((%guile-for-build
- (package-derivation store
- (if (assoc-ref opts 'bootstrap?)
- %bootstrap-guile
- (canonical-package guile-2.0)))))
- (run-with-store store
- (build-and-install tarball (config-directory)
- #:verbose? (assoc-ref opts 'verbose?)))))))))
+ (with-store store
+ (set-build-options-from-command-line store opts)
+ (let ((tarball
+ (if (use-le-certs? url)
+ (let* ((drv (package-derivation store le-certs))
+ (certs (string-append (derivation->output-path drv)
+ "/etc/ssl/certs")))
+ (build-derivations store (list drv))
+ (parameterize ((%x509-certificate-directory certs))
+ (fetch-tarball store url)))
+ (fetch-tarball store url))))
+ (unless tarball
+ (leave (G_ "failed to download up-to-date source, exiting\n")))
+ (parameterize ((%guile-for-build
+ (package-derivation store
+ (if (assoc-ref opts 'bootstrap?)
+ %bootstrap-guile
+ (canonical-package guile-2.0)))))
+ (run-with-store store
+ (build-and-install tarball (config-directory)
+ #:verbose? (assoc-ref opts 'verbose?))))))))))
;; Local Variables:
;; eval: (put 'with-PATH 'scheme-indent-function 1)