From ed2d4d52dde00bdccc1bb2c93b24ffcc72a7fcd3 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 10 May 2021 12:23:55 -0400 Subject: [PATCH] maint: update-NEWS: Sort packages prior writing to the data file. * build-aux/update-NEWS.scm (main): Sort packages. --- build-aux/update-NEWS.scm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/build-aux/update-NEWS.scm b/build-aux/update-NEWS.scm index e916f3f1e8..c029d2f0da 100644 --- a/build-aux/update-NEWS.scm +++ b/build-aux/update-NEWS.scm @@ -166,16 +166,22 @@ (define (package-file version) (string-append data-directory "/packages-" version ".txt")) + (define (packageversions))) (format (current-error-port) "Updating NEWS for ~a to ~a...~%" previous-version new-version) (let* ((old (call-with-input-file (package-file previous-version) read)) - (new (fold-packages (lambda (p r) - (alist-cons (package-name p) (package-version p) - r)) - '()))) + (all-packages/sorted (sort (fold-packages (lambda (p r) + (cons p r)) + '()) + package