From 0fdd992b1fd0c24e6f7ab5630575904926d91137 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 15 Oct 2026 12:16:48 +0200 Subject: fix(updates): drop a redundant clause, test the mirror blacklist The awaiting-build branch also required the build to be older than upstream, which cannot fail there: a build newer than installed was already taken as an upgrade, so the build is at most the installed version, which is behind upstream whenever a row is emitted. Removing it left every test passing, which is how it was found. The blacklisted testing/ entry sat after the main one in the fixture, so setdefault kept the main one and the mirror-side blacklist was never exercised; it now comes first, and dropping the check fails the test. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/updates/test_updatesctl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (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 0714e4e..a4d0cc0 100644 --- a/desktop/modules/updates/test_updatesctl.py +++ b/desktop/modules/updates/test_updatesctl.py @@ -126,8 +126,9 @@ w(tmp / "etc/slackpkg/mirrors", "# a comment\nfile://mnt/mirror/\n") w(tmp / "etc/slackpkg/blacklist", '"testing/"\n[0-9]+_SBo\n') w(tmp / "mnt/mirror/PACKAGES.TXT", pkgtxt([ ("slackware64/l", "glibc-2.44-x86_64-4"), - ("slackware64/a", "bash-5.3-x86_64-1"), + # testing/ first: the blacklisted entry must lose even when it comes first. ("testing/packages", "bash-5.4-x86_64-1"), + ("slackware64/a", "bash-5.3-x86_64-1"), ("slackware64/a", "foo-1.1-x86_64-1"), ("slackware64/l", "libtatsu-1.0.5-x86_64-1"), ])) -- cgit v1.2.3