1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

build: emacs-build-system: Respect “Package-Version”.

Unlike the builtin ‘package-buffer-info’, the ‘write-pkg-file’ procedure
previously ignored the “Package-Version” header, leading to wrongly reported
version numbers when an actual version would have been available.

* guix/build/emacs-build-system.scm (ensure-package-description): Check for
“package-version” header before invoking ‘lm-version’.

Fixes: guix/guix#5462 (‘emacs-build-system’ generates wrong package versions)
This commit is contained in:
Liliana Marie Prikler
2026-03-12 15:06:10 +01:00
parent b34a367adc
commit 599cd425a0

View File

@@ -182,7 +182,7 @@ locations in the store in '.el' files."
;; of generation -pkg.el will fail.
(condition-case
nil
(let ((version (lm-version)))
(let ((version (or (lm-header "package-version") (lm-version))))
;; raises an error if version is invalid
(and (version-to-list version) version))
(error "0.0.0"))