diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-09-11 11:40:32 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-09-11 11:40:32 +0200 |
commit | e9f38113908414792ce2e5c1d3203cc8e5cb938b (patch) | |
tree | 19f485b0cc663094d13f1a466a84217b0efee726 | |
parent | 21c2757f27061cd6647cb00797b1c6c85f3325e8 (diff) | |
download | gnu-guix-e9f38113908414792ce2e5c1d3203cc8e5cb938b.tar gnu-guix-e9f38113908414792ce2e5c1d3203cc8e5cb938b.tar.gz |
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.
-rw-r--r-- | guix/gnu-maintenance.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 7c7ca65d7b..c903b740ba 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -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) |