From 140da556be06442192fbae5e2a07357f26fbc26b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 2 Sep 2020 13:08:46 -0400 Subject: [PATCH] ui: Lexicographically sort transaction entries based on their package name. * guix/ui.scm (show-manifest-transaction): Sort entries to be displayed in a tabulated view. --- guix/ui.scm | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index 9c641afe3e..115d9801b2 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -1240,18 +1240,21 @@ (define* (show-manifest-transaction store manifest transaction #:key dry-run?) "Display what will/would be installed/removed from MANIFEST by TRANSACTION." (define* (package-strings names versions outputs #:key old-versions) - (tabulate (zip (map (lambda (name output) - (if (string=? output "out") - name - (string-append name ":" output))) - names outputs) - (if old-versions - (map (lambda (old new) - (if (string=? old new) - (G_ "(dependencies or package changed)") - (string-append old " " → " " new))) - old-versions versions) - versions)) + (tabulate (stable-sort + (zip (map (lambda (name output) + (if (string=? output "out") + name + (string-append name ":" output))) + names outputs) + (if old-versions + (map (lambda (old new) + (if (string=? old new) + (G_ "(dependencies or package changed)") + (string-append old " " → " " new))) + old-versions versions) + versions)) + (lambda (x y) + (string