mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-10 05:31:21 +01:00
pull: Use 'fold-available-packages' for the current package list.
* guix/scripts/pull.scm (display-profile-news): Use 'fold-available-packages' instead of 'fold-packages' to compute OLD. (profile-package-alist): Use 'inferior-available-packages'.
This commit is contained in:
parent
e2760d1a8b
commit
46765f82db
1 changed files with 12 additions and 14 deletions
|
@ -169,11 +169,14 @@ Download and deploy the latest version of Guix.\n"))
|
||||||
(reverse (profile-generations profile)))
|
(reverse (profile-generations profile)))
|
||||||
((current previous _ ...)
|
((current previous _ ...)
|
||||||
(newline)
|
(newline)
|
||||||
(let ((old (fold-packages (lambda (package result)
|
(let ((old (fold-available-packages
|
||||||
(alist-cons (package-name package)
|
(lambda* (name version result
|
||||||
(package-version package)
|
#:key supported? deprecated?
|
||||||
result))
|
#:allow-other-keys)
|
||||||
'()))
|
(if (and supported? (not deprecated?))
|
||||||
|
(alist-cons name version result)
|
||||||
|
result))
|
||||||
|
'()))
|
||||||
(new (profile-package-alist
|
(new (profile-package-alist
|
||||||
(generation-file-name profile current))))
|
(generation-file-name profile current))))
|
||||||
(display-new/upgraded-packages old new
|
(display-new/upgraded-packages old new
|
||||||
|
@ -338,15 +341,10 @@ way and displaying details about the channel's source code."
|
||||||
(define profile-package-alist
|
(define profile-package-alist
|
||||||
(mlambda (profile)
|
(mlambda (profile)
|
||||||
"Return a name/version alist representing the packages in PROFILE."
|
"Return a name/version alist representing the packages in PROFILE."
|
||||||
(fold (lambda (package lst)
|
(let* ((inferior (open-inferior profile))
|
||||||
(alist-cons (inferior-package-name package)
|
(packages (inferior-available-packages inferior)))
|
||||||
(inferior-package-version package)
|
(close-inferior inferior)
|
||||||
lst))
|
packages)))
|
||||||
'()
|
|
||||||
(let* ((inferior (open-inferior profile))
|
|
||||||
(packages (inferior-packages inferior)))
|
|
||||||
(close-inferior inferior)
|
|
||||||
packages))))
|
|
||||||
|
|
||||||
(define* (display-new/upgraded-packages alist1 alist2
|
(define* (display-new/upgraded-packages alist1 alist2
|
||||||
#:key (heading ""))
|
#:key (heading ""))
|
||||||
|
|
Loading…
Add table
Reference in a new issue