From ee5ce7284aef8679fabcf728dd5bd5a17c965798 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 22 Jul 2016 04:32:12 -0500 Subject: version: consider pkg-rX and pkg to be the same version --- src/version.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/version.c b/src/version.c index 00c78d1..eaac762 100644 --- a/src/version.c +++ b/src/version.c @@ -218,6 +218,11 @@ int apk_version_compare_blob(apk_blob_t a, apk_blob_t b) if (at == bt) return APK_VERSION_EQUAL; + /* if only difference is pkgrev, they are equal. */ + if ((at == TOKEN_REVISION_NO && bt == TOKEN_END) || + (at == TOKEN_END && bt == TOKEN_REVISION_NO)) + return APK_VERSION_EQUAL; + /* leading version components and their values are equal, * now the non-terminating version is greater unless it's a suffix * indicating pre-release */ -- cgit v1.2.3-60-g2f50