summaryrefslogtreecommitdiff
path: root/guix/scripts/pull.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-02-12 22:09:07 +0100
committerLudovic Courtès <ludo@gnu.org>2019-02-12 23:30:16 +0100
commit46765f82dbd541a6ab48ba84816dbcf701d8714b (patch)
tree5e5d4fa5ee960f7d5a2b6c3696caa9182acab101 /guix/scripts/pull.scm
parente2760d1a8b7308eb284f5bf04b133cee7f58bbe0 (diff)
downloadguix-patches-46765f82dbd541a6ab48ba84816dbcf701d8714b.tar
guix-patches-46765f82dbd541a6ab48ba84816dbcf701d8714b.tar.gz
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'.
Diffstat (limited to 'guix/scripts/pull.scm')
-rw-r--r--guix/scripts/pull.scm26
1 files changed, 12 insertions, 14 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index e721cb859e..a1d27406a5 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -169,11 +169,14 @@ 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)
- result))
- '()))
+ (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
(generation-file-name profile current))))
(display-new/upgraded-packages old new
@@ -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)))
- (close-inferior inferior)
- packages))))
+ (let* ((inferior (open-inferior profile))
+ (packages (inferior-available-packages inferior)))
+ (close-inferior inferior)
+ packages)))
(define* (display-new/upgraded-packages alist1 alist2
#:key (heading ""))