guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/05: gnu-maintenance: Correctly compare versions.


From: Ludovic Courtès
Subject: 02/05: gnu-maintenance: Correctly compare versions.
Date: Mon, 11 Sep 2017 05:58:16 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit e9f38113908414792ce2e5c1d3203cc8e5cb938b
Author: Ludovic Courtès <address@hidden>
Date:   Mon Sep 11 11:40:32 2017 +0200

    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.
---
 guix/gnu-maintenance.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 7c7ca65..c903b74 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]