me
/
guix
Archived
1
0
Fork 0

pull: Use 'with-store'.

* guix/scripts/pull.scm (guix-pull): Remove call to 'open-connection'.
Use 'with-store' instead.
master
Ludovic Courtès 2017-05-09 15:48:23 +02:00
parent 4902d3c4e0
commit 402e98c524
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 21 additions and 21 deletions

View File

@ -238,29 +238,29 @@ contained therein."
(with-error-handling (with-error-handling
(let* ((opts (parse-command-line args %options (let* ((opts (parse-command-line args %options
(list %default-options))) (list %default-options)))
(store (open-connection))
(url (assoc-ref opts 'tarball-url))) (url (assoc-ref opts 'tarball-url)))
(set-build-options-from-command-line store opts)
(unless (assoc-ref opts 'dry-run?) ;XXX: not very useful (unless (assoc-ref opts 'dry-run?) ;XXX: not very useful
(let ((tarball (with-store store
(if (use-le-certs? url) (set-build-options-from-command-line store opts)
(let* ((drv (package-derivation store le-certs)) (let ((tarball
(certs (string-append (derivation->output-path drv) (if (use-le-certs? url)
"/etc/ssl/certs"))) (let* ((drv (package-derivation store le-certs))
(build-derivations store (list drv)) (certs (string-append (derivation->output-path drv)
(parameterize ((%x509-certificate-directory certs)) "/etc/ssl/certs")))
(fetch-tarball store url))) (build-derivations store (list drv))
(fetch-tarball store url)))) (parameterize ((%x509-certificate-directory certs))
(unless tarball (fetch-tarball store url)))
(leave (G_ "failed to download up-to-date source, exiting\n"))) (fetch-tarball store url))))
(parameterize ((%guile-for-build (unless tarball
(package-derivation store (leave (G_ "failed to download up-to-date source, exiting\n")))
(if (assoc-ref opts 'bootstrap?) (parameterize ((%guile-for-build
%bootstrap-guile (package-derivation store
(canonical-package guile-2.0))))) (if (assoc-ref opts 'bootstrap?)
(run-with-store store %bootstrap-guile
(build-and-install tarball (config-directory) (canonical-package guile-2.0)))))
#:verbose? (assoc-ref opts 'verbose?))))))))) (run-with-store store
(build-and-install tarball (config-directory)
#:verbose? (assoc-ref opts 'verbose?))))))))))
;; Local Variables: ;; Local Variables:
;; eval: (put 'with-PATH 'scheme-indent-function 1) ;; eval: (put 'with-PATH 'scheme-indent-function 1)