From a58e3ce68f68b2e421f819f6431b82a90d5f5a0c Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Thu, 20 Jul 2017 18:02:08 -0700 Subject: [PATCH] devops: Fix version-comparator. --- src/devops/devops.scm | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/devops/devops.scm b/src/devops/devops.scm index cd46a03ec..cceddbd03 100644 --- a/src/devops/devops.scm +++ b/src/devops/devops.scm @@ -707,20 +707,21 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (version-comparator < >) (named-lambda (version-compare v1 v2) - (cond ((eq? #f v1) - #t) - ((eq? #f v2) - #f) - ((null? v2) - #f) - ((null? v1) ;; and (pair? v2) - #t) - ((< (car v1) (car v2)) - #t) - ((> (car v1) (car v2)) - #f) - (else - (version (car v1) (car v2)) + #f) + (else + (loop (cdr v1) (cdr v2))))))) (define (->version string) (and string -- 2.25.1