From e6edfd28a88d36cde37c92c7d10649506bcaabd6 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 21 Feb 2021 09:53:33 -0700 Subject: DPKG-VERSION-COMPARE should accept numbers and strings Signed-off-by: Sean Whitton --- src/util.lisp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/util.lisp') diff --git a/src/util.lisp b/src/util.lisp index a2d4cde..4e93ea0 100644 --- a/src/util.lisp +++ b/src/util.lisp @@ -48,7 +48,14 @@ (dpkg-version-compare x ">=" y)) (defun dpkg-version-compare (x r y) - (= 0 (nth-value 2 (run-program (list "dpkg" "--compare-versions" x r y) + (= 0 (nth-value 2 (run-program `("dpkg" "--compare-versions" + ,(etypecase x + (string x) + (number (format nil "~A" x))) + ,r + ,(etypecase y + (string y) + (number (format nil "~A" y)))) :ignore-error-status t)))) -- cgit v1.2.3