From 3be0c13fc5258b8f3128d4531102a6958b63b989 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 24 Nov 2025 11:46:23 +0100 Subject: [PATCH] Drop Debian 12 from supported OS list (#6337) * Drop Debian 12 from supported OS list With the deprecation of Home Assistant Supervised installation method Debian 12 is no longer supported. This change removes Debian 12 from the list of supported operating systems in the evaluation logic. * Improve tests --- .../resolution/evaluations/operating_system.py | 6 +----- .../evaluation/test_evaluate_operating_system.py | 13 ++----------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/supervisor/resolution/evaluations/operating_system.py b/supervisor/resolution/evaluations/operating_system.py index 9516d51f3..cca3a2532 100644 --- a/supervisor/resolution/evaluations/operating_system.py +++ b/supervisor/resolution/evaluations/operating_system.py @@ -5,8 +5,6 @@ from ...coresys import CoreSys from ..const import UnsupportedReason from .base import EvaluateBase -SUPPORTED_OS = ["Debian GNU/Linux 12 (bookworm)"] - def setup(coresys: CoreSys) -> EvaluateBase: """Initialize evaluation-setup function.""" @@ -33,6 +31,4 @@ class EvaluateOperatingSystem(EvaluateBase): async def evaluate(self) -> bool: """Run evaluation.""" - if self.sys_os.available: - return False - return self.sys_host.info.operating_system not in SUPPORTED_OS + return not self.sys_os.available diff --git a/tests/resolution/evaluation/test_evaluate_operating_system.py b/tests/resolution/evaluation/test_evaluate_operating_system.py index e4e699dcb..b8517c4ec 100644 --- a/tests/resolution/evaluation/test_evaluate_operating_system.py +++ b/tests/resolution/evaluation/test_evaluate_operating_system.py @@ -5,10 +5,7 @@ from unittest.mock import MagicMock, patch from supervisor.const import CoreState from supervisor.coresys import CoreSys -from supervisor.resolution.evaluations.operating_system import ( - SUPPORTED_OS, - EvaluateOperatingSystem, -) +from supervisor.resolution.evaluations.operating_system import EvaluateOperatingSystem async def test_evaluation(coresys: CoreSys): @@ -25,13 +22,7 @@ async def test_evaluation(coresys: CoreSys): assert operating_system.reason in coresys.resolution.unsupported coresys.os._available = True - await operating_system() - assert operating_system.reason not in coresys.resolution.unsupported - coresys.os._available = False - - coresys.host._info = MagicMock( - operating_system=SUPPORTED_OS[0], timezone=None, timezone_tzinfo=None - ) + assert coresys.os.available await operating_system() assert operating_system.reason not in coresys.resolution.unsupported