[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/09: pull: Use 'fold-available-packages' for the current package list.
From: |
guix-commits |
Subject: |
01/09: pull: Use 'fold-available-packages' for the current package list. |
Date: |
Tue, 12 Feb 2019 17:30:34 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 46765f82dbd541a6ab48ba84816dbcf701d8714b
Author: Ludovic Courtès <address@hidden>
Date: Tue Feb 12 22:09:07 2019 +0100
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'.
---
guix/scripts/pull.scm | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index e721cb8..a1d2740 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 ""))
- branch master updated (e2760d1 -> be4d840), guix-commits, 2019/02/12
- 01/09: pull: Use 'fold-available-packages' for the current package list.,
guix-commits <=
- 06/09: gnu: Add python-rope., guix-commits, 2019/02/12
- 09/09: gnu: Add python-language-server., guix-commits, 2019/02/12
- 07/09: gnu: Add python-jsonrpc-server., guix-commits, 2019/02/12
- 05/09: gnu: python2-rope: Change comment to reflect partial python3 support, guix-commits, 2019/02/12
- 03/09: pull: Move profile comparison to 'new/upgraded-packages'., guix-commits, 2019/02/12
- 04/09: pull: Speed up the new/upgraded package computation., guix-commits, 2019/02/12
- 02/09: inferior: Add 'inferior-available-packages'., guix-commits, 2019/02/12
- 08/09: gnu: Add python-docstyle., guix-commits, 2019/02/12