mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
scripts: style: Only sort packages with string literal name.
* guix/scripts/style.scm (order-packages): Only match string literals. Change-Id: I48a5976930501c20415b5413966b5294958bc23b Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
6ad2e407eb
commit
c346614c3e
1 changed files with 7 additions and 5 deletions
|
@ -515,11 +515,13 @@ share a name are placed with versions in descending order."
|
|||
(define (package>? lst1 lst2)
|
||||
(let-values (((name1 version1) (package-fields lst1))
|
||||
((name2 version2) (package-fields lst2)))
|
||||
(and name1 name2 (or (string>? name1 name2)
|
||||
(and (string=? name1 name2)
|
||||
version1
|
||||
version2
|
||||
(version>? version2 version1))))))
|
||||
(and (string? name1)
|
||||
(string? name2)
|
||||
(or (string>? name1 name2)
|
||||
(and (string=? name1 name2)
|
||||
(string? version1)
|
||||
(string? version2)
|
||||
(version>? version2 version1))))))
|
||||
|
||||
;; Group define-public with preceding blanks and defines.
|
||||
(let ((lst (fold2 (lambda (expr tail head)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue