From 31c36574e73ba448b0a883f046dbb5021882273e Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Fri, 30 Apr 2021 13:56:17 +0200 Subject: [PATCH 3/6] 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 3fa70a81d0..8027d9d0f1 100755 --- a/etc/committer.scm.in +++ b/etc/committer.scm.in @@ -274,12 +274,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