Report packages on hold, and flag held kernel packages
A held package never upgrades, and apt's simulation leaves it out, so its updates (security ones included) appear nowhere. A leftover hold on linux-image-amd64 or linux-generic keeps a host on its kernel while it looks current. The agent reports installed held packages (dpkg's "hi") as held_packages. A held linux-* package puts the host in update with the apt-mark unhold hint; other holds, usually deliberate, get a note. The host page lists them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f88261d2f5
commit
4676942108
7 files changed
+61
-1
No files matched your search
@@ -339,6 +339,18 @@ class EvaluateTest(unittest.TestCase):
|
||||
self.assertEqual(self.level(report(dpkg_unfinished_packages=[])).level, "ok")
|
||||
self.assertEqual(self.level(report(dpkg_unfinished_packages=None)).level, "ok")
|
||||
|
||||
def test_held_kernel_package_is_a_problem(self):
|
||||
s = self.level(report(held_packages=["linux-image-amd64"]))
|
||||
self.assertEqual(s.level, "update")
|
||||
self.assertEqual(s.reasons, ["kernel package on hold, so kernel updates won't install: "
|
||||
"linux-image-amd64; apt-mark unhold to release"])
|
||||
|
||||
def test_other_held_packages_are_a_note(self):
|
||||
s = self.level(report(held_packages=["postgresql-16", "docker-ce"]))
|
||||
self.assertEqual(s.level, "ok")
|
||||
self.assertEqual(s.reasons, ["2 packages on hold, updates to them won't show: postgresql-16, docker-ce"])
|
||||
self.assertEqual(self.level(report(held_packages=[])).reasons, [])
|
||||
|
||||
def test_os_past_end_of_support(self):
|
||||
s = self.level(report(os_id="debian", os_version_id="11"))
|
||||
self.assertEqual(s.level, "update")
|
||||
|
||||
Reference in new issue
Block a user