mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-13 14:40:21 -05:00
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.
This commit is contained in:
parent
7d3eb5e6b7
commit
140da556be
1 changed files with 15 additions and 12 deletions
27
guix/ui.scm
27
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<? (first x) (first y))))
|
||||
#:initial-indent 3))
|
||||
|
||||
(define → ;an arrow that can be represented on stderr
|
||||
|
|
Loading…
Reference in a new issue