Show Ubuntu phased updates separately from available updates

apt lists updates deferred by phasing in an indented block rather than
as Inst lines, so they were already excluded from the counts but
invisible. The agent now parses that block into phased_packages; the
dashboard shows "+N phased" in the Updates column (with a tooltip) and
the list on the host page. Phasing never affects status: Ubuntu doesn't
phase security updates, and there's nothing to act on until apt offers
the update.

Run the apt simulation with LC_ALL=C since we parse its messages (the
systemd unit already runs in the C locale; manual --print may not).
Agent and server 0.3.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
patrickandClaude Opus 5.5 committed 2026-10-17 12:03:02 -04:00
1 parent ac17a98e91
commit 271af3b071
8 files changed
+76 -7

No files matched your search

+4
View File
@@ -169,6 +169,10 @@ class EvaluateTest(unittest.TestCase):
self.assertEqual(s.level, "update")
self.assertEqual(s.reasons, ["3 security updates pending"])
def test_phased_updates_dont_affect_status(self):
s = self.level(report(phased_packages=["systemd", "udev"]))
self.assertEqual((s.level, s.reasons), ("ok", []))
def test_non_security_updates_are_ok(self):
self.assertEqual(self.level(report(upgradable_count=5)).level, "ok")