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:
Ludovic Courtès 2019-02-12 22:09:07 +01:00
parent e2760d1a8b
commit 46765f82db
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 12 additions and 14 deletions

View File

@ -169,9 +169,12 @@ Download and deploy the latest version of Guix.\n"))
(reverse (profile-generations profile)))
((current previous _ ...)
(newline)
(let ((old (fold-packages (lambda (package result)
(alist-cons (package-name package)
(package-version package)
(let ((old (fold-available-packages
(lambda* (name version result
#:key supported? deprecated?
#:allow-other-keys)
(if (and supported? (not deprecated?))
(alist-cons name version result)
result))
'()))
(new (profile-package-alist
@ -338,15 +341,10 @@ way and displaying details about the channel's source code."
(define profile-package-alist
(mlambda (profile)
"Return a name/version alist representing the packages in PROFILE."
(fold (lambda (package lst)
(alist-cons (inferior-package-name package)
(inferior-package-version package)
lst))
'()
(let* ((inferior (open-inferior profile))
(packages (inferior-packages inferior)))
(packages (inferior-available-packages inferior)))
(close-inferior inferior)
packages))))
packages)))
(define* (display-new/upgraded-packages alist1 alist2
#:key (heading ""))