diff options
author | Alex Kost <alezost@gmail.com> | 2014-10-05 23:52:52 +0400 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2014-10-06 22:14:38 +0400 |
commit | 1f06b28899c2d18a70715c9bc3922f45815501a1 (patch) | |
tree | 0666730c5023a84a7565bfe7c368eb51a262b785 | |
parent | 75af27f7645049a321c6856ce36c2cba9e046c4b (diff) | |
download | guix-1f06b28899c2d18a70715c9bc3922f45815501a1.tar.gz guix-1f06b28899c2d18a70715c9bc3922f45815501a1.zip |
emacs: Use 'with-store' in 'process-package-actions'.
* emacs/guix-main.scm (process-package-actions): Use 'with-store'.
-rw-r--r-- | emacs/guix-main.scm | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 7dbfa61b6f..b85bb5c8fe 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -790,31 +790,31 @@ OUTPUTS is a list of package outputs (may be an empty list)." (new-manifest (manifest-perform-transaction manifest transaction))) (unless (and (null? install) (null? remove)) - (let* ((store (open-connection)) - (derivation (run-with-store - store (profile-derivation new-manifest))) - (derivations (list derivation)) - (new-profile (derivation->output-path derivation))) - (set-build-options store - #:use-substitutes? use-substitutes?) - (manifest-show-transaction store manifest transaction - #:dry-run? dry-run?) - (show-what-to-build store derivations - #:use-substitutes? use-substitutes? - #:dry-run? dry-run?) - (unless dry-run? - (let ((name (generation-file-name - profile - (+ 1 (generation-number profile))))) - (and (build-derivations store derivations) - (let* ((entries (manifest-entries new-manifest)) - (count (length entries))) - (switch-symlinks name new-profile) - (switch-symlinks profile name) - (format #t (N_ "~a package in profile~%" - "~a packages in profile~%" - count) - count))))))))) + (with-store store + (let* ((derivation (run-with-store store + (profile-derivation new-manifest))) + (derivations (list derivation)) + (new-profile (derivation->output-path derivation))) + (set-build-options store + #:use-substitutes? use-substitutes?) + (manifest-show-transaction store manifest transaction + #:dry-run? dry-run?) + (show-what-to-build store derivations + #:use-substitutes? use-substitutes? + #:dry-run? dry-run?) + (unless dry-run? + (let ((name (generation-file-name + profile + (+ 1 (generation-number profile))))) + (and (build-derivations store derivations) + (let* ((entries (manifest-entries new-manifest)) + (count (length entries))) + (switch-symlinks name new-profile) + (switch-symlinks profile name) + (format #t (N_ "~a package in profile~%" + "~a packages in profile~%" + count) + count)))))))))) (define (delete-generations* profile generations) "Delete GENERATIONS from PROFILE. |