From d190b8088908518e51ac3e2b2bfa92747a506aba Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Fri, 30 Apr 2021 13:56:17 +0200 Subject: [PATCH 03/11] etc: committer: Only claim to be updating a package when it's true. * etc/committer.scm.in (change-commit-message): If the patch does not change the version, do not falsely say the package is updated, and instead output a placeholder to be filled in by the user. --- etc/committer.scm.in | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/etc/committer.scm.in b/etc/committer.scm.in index 1f25c424dd..02f7817bde 100755 --- a/etc/committer.scm.in +++ b/etc/committer.scm.in @@ -301,12 +301,17 @@ Return false if all changes could be explained and truth otherwise." ", and " (first (take-right items 1)))))) (define variable-name (second old)) - (define version - (and=> ((sxpath '(// version *any*)) new) + (define (version exp) + (and=> ((sxpath '(// version *any*)) exp) first)) - (format port - "gnu: ~a: Update to ~a.~%~%* ~a (~a): Update to ~a.~%" - variable-name version file-name variable-name version) + (define old-version (version old)) + (define new-version (version new)) + (cond ((not (equal? old-version new-version)) + (format port "gnu: ~a: Update to ~a.~%~%* ~a (~a): Update to ~a.~%" + variable-name new-version file-name variable-name new-version)) + (#t + (format port "gnu: ~a: ~%~%* ~a (~a): FIXME!.~%" + variable-name file-name variable-name))) (for-each (lambda (field) (let ((old-values (get-values old field)) (new-values (get-values new field))) -- 2.31.1