diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-15 12:20:32 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-15 12:20:32 +0200 |
| commit | 7db7405c80e8f00008bc5196abfda2c500071a98 (patch) | |
| tree | ca1dc409b31931b5dc11f5c1588b3df1df0aca0a /desktop/modules/updates/test_updatesctl.py | |
| parent | 0fdd992b1fd0c24e6f7ab5630575904926d91137 (diff) | |
| download | quickshell-7db7405c80e8f00008bc5196abfda2c500071a98.tar.gz quickshell-7db7405c80e8f00008bc5196abfda2c500071a98.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/updates/test_updatesctl.py')
| -rw-r--r-- | desktop/modules/updates/test_updatesctl.py | 5 |
1 files changed, 5 insertions, 0 deletions
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-")) |
