From 7db7405c80e8f00008bc5196abfda2c500071a98 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 15 Oct 2026 12:20:32 +0200 Subject: fix(updates): review findings in updatesctl A git hash starting with a letter (3.1-a59215d) ordered behind its base, because any trailing alphabetic chunk counted as a pre-release; only alpha, beta, rc, pre and dev do now. Trailing zeros (1.14 against 1.14.0) compare equal instead of reading as an upstream bump. A bad line in the slackpkg blacklist is skipped rather than crashing the script and leaving the drawer with nothing. An AppImage keeps its key over a flatpak of the same name, as the spec orders them, and flatpak list has a timeout. A Slackware upgrade compares version and build, so an arch change alone is not a row. The spec's prose now matches the code: the upstream comparison includes the installed version. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/updates/test_updatesctl.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'desktop/modules/updates/test_updatesctl.py') diff --git a/desktop/modules/updates/test_updatesctl.py b/desktop/modules/updates/test_updatesctl.py index a4d0cc0..333819b 100644 --- a/desktop/modules/updates/test_updatesctl.py +++ b/desktop/modules/updates/test_updatesctl.py @@ -43,6 +43,11 @@ assert u.vercmp("0.12.3_beta.4", "0.12.3") < 0 assert u.vercmp("9.018.00_6.18.41", "9.018.00") > 0 assert u.vercmp("3.1-659215d", "3.1") > 0 assert u.vercmp("1.0.1", "1.0rc1") > 0 +# Only named pre-releases are behind: a git hash starting with a letter is a +# suffix, and trailing zeros are not a newer version. +assert u.vercmp("3.1-a59215d", "3.1") > 0 +assert u.vercmp("1.14", "1.14.0") == 0 +assert u.vercmp("2.0rc1", "2.0") < 0 # --- fixture tree --- tmp = Path(tempfile.mkdtemp(prefix="updatesctl-test-")) -- cgit v1.2.3