mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
emacs: Use 'with-store' in 'process-package-actions'.
* emacs/guix-main.scm (process-package-actions): Use 'with-store'.
This commit is contained in:
parent
75af27f764
commit
1f06b28899
1 changed files with 25 additions and 25 deletions
|
@ -790,31 +790,31 @@ (define* (process-package-actions
|
|||
(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.
|
||||
|
|
Loading…
Reference in a new issue