mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
etc: committer: Fix crashes on missing package version fields.
* etc/committer.scm.in (change-commit-message): Fix handling of missing package version fields. Change-Id: Id6565dc30a25f6bd53ba2c1f82609a357c375d8c Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
2b08ff1cf7
commit
efdc2d0ad8
1 changed files with 10 additions and 5 deletions
|
|
@ -283,15 +283,20 @@ corresponding to the top-level definition containing the staged changes."
|
|||
(define variable-name
|
||||
(second old))
|
||||
(define version
|
||||
(and=> ((xpath:node-or
|
||||
(match ((xpath:node-or
|
||||
(xpath:sxpath '(*any* *any* package version *any*))
|
||||
;; For let binding
|
||||
(xpath:sxpath '(*any* *any* (*any*) package version *any*)))
|
||||
(cons '*TOP* new))
|
||||
first))
|
||||
(format port
|
||||
"gnu: ~a: Update to ~a.~%~%* ~a (~a): Update to ~a.~%"
|
||||
variable-name version file-name variable-name version)
|
||||
(() #f)
|
||||
((version . rest) version)))
|
||||
(if version
|
||||
(format port
|
||||
"gnu: ~a: Update to ~a.~%~%* ~a (~a): Update to ~a.~%"
|
||||
variable-name version file-name variable-name version)
|
||||
(format port
|
||||
"gnu: ~a: Update.~%~%* ~a (~a): Update.~%"
|
||||
variable-name file-name variable-name))
|
||||
(for-each (lambda (field)
|
||||
(let ((old-values (get-values old field))
|
||||
(new-values (get-values new field)))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue