gnu-maintenance: Correctly compare versions.

* guix/gnu-maintenance.scm (latest-gnu-release): Add calls to
'sans-extension'.  This fixes version comparison, which could be fooled
with the ".tar.gz" extension.
This commit is contained in:
Ludovic Courtès 2017-09-11 11:40:32 +02:00
parent 21c2757f27
commit e9f3811390
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -472,11 +472,11 @@ list available from %GNU-FILE-LIST-URI over HTTP(S)."
(let* ((files (ftp.gnu.org-files))
(relevant (filter (lambda (file)
(and (string-contains file directory)
(release-file? name (basename file))
))
(release-file? name (basename file))))
files)))
(match (sort relevant (lambda (file1 file2)
(version>? (basename file1) (basename file2))))
(version>? (sans-extension (basename file1))
(sans-extension (basename file2)))))
((tarball _ ...)
(upstream-source
(package name)