mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-24 19:49:25 -05:00
guix package: Use 'manifest-add'.
* guix/scripts/package.scm (guix-package)[process-actions]: Use 'manifest-add' instead of the equivalent code.
This commit is contained in:
parent
f755403014
commit
f48624fc68
1 changed files with 4 additions and 14 deletions
|
@ -872,19 +872,8 @@ (define (delete-generation number)
|
||||||
(let* ((manifest (profile-manifest profile))
|
(let* ((manifest (profile-manifest profile))
|
||||||
(install (options->installable opts manifest))
|
(install (options->installable opts manifest))
|
||||||
(remove (options->removable opts manifest))
|
(remove (options->removable opts manifest))
|
||||||
(entries
|
(new (manifest-add (manifest-remove manifest remove)
|
||||||
(append install
|
|
||||||
(fold (lambda (package result)
|
|
||||||
(match package
|
|
||||||
(($ <manifest-entry> name _ out _ ...)
|
|
||||||
(filter (negate
|
|
||||||
(cut same-package? <>
|
|
||||||
name out))
|
|
||||||
result))))
|
|
||||||
(manifest-entries
|
|
||||||
(manifest-remove manifest remove))
|
|
||||||
install)))
|
install)))
|
||||||
(new (make-manifest entries)))
|
|
||||||
|
|
||||||
(when (equal? profile %current-profile)
|
(when (equal? profile %current-profile)
|
||||||
(ensure-default-profile))
|
(ensure-default-profile))
|
||||||
|
@ -914,7 +903,8 @@ (define (delete-generation number)
|
||||||
(name (generation-file-name profile
|
(name (generation-file-name profile
|
||||||
(+ 1 number))))
|
(+ 1 number))))
|
||||||
(and (build-derivations (%store) (list prof-drv))
|
(and (build-derivations (%store) (list prof-drv))
|
||||||
(let ((count (length entries)))
|
(let* ((entries (manifest-entries new))
|
||||||
|
(count (length entries)))
|
||||||
(switch-symlinks name prof)
|
(switch-symlinks name prof)
|
||||||
(switch-symlinks profile name)
|
(switch-symlinks profile name)
|
||||||
(maybe-register-gc-root (%store) profile)
|
(maybe-register-gc-root (%store) profile)
|
||||||
|
|
Loading…
Reference in a new issue