1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-20 02:18:59 +00:00

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
This commit is contained in:
Stefan Agner
2025-11-24 11:46:23 +01:00
committed by GitHub
parent bb450cad4f
commit 3be0c13fc5
2 changed files with 3 additions and 16 deletions

View File

@@ -5,8 +5,6 @@ from ...coresys import CoreSys
from ..const import UnsupportedReason from ..const import UnsupportedReason
from .base import EvaluateBase from .base import EvaluateBase
SUPPORTED_OS = ["Debian GNU/Linux 12 (bookworm)"]
def setup(coresys: CoreSys) -> EvaluateBase: def setup(coresys: CoreSys) -> EvaluateBase:
"""Initialize evaluation-setup function.""" """Initialize evaluation-setup function."""
@@ -33,6 +31,4 @@ class EvaluateOperatingSystem(EvaluateBase):
async def evaluate(self) -> bool: async def evaluate(self) -> bool:
"""Run evaluation.""" """Run evaluation."""
if self.sys_os.available: return not self.sys_os.available
return False
return self.sys_host.info.operating_system not in SUPPORTED_OS

View File

@@ -5,10 +5,7 @@ from unittest.mock import MagicMock, patch
from supervisor.const import CoreState from supervisor.const import CoreState
from supervisor.coresys import CoreSys from supervisor.coresys import CoreSys
from supervisor.resolution.evaluations.operating_system import ( from supervisor.resolution.evaluations.operating_system import EvaluateOperatingSystem
SUPPORTED_OS,
EvaluateOperatingSystem,
)
async def test_evaluation(coresys: CoreSys): async def test_evaluation(coresys: CoreSys):
@@ -25,13 +22,7 @@ async def test_evaluation(coresys: CoreSys):
assert operating_system.reason in coresys.resolution.unsupported assert operating_system.reason in coresys.resolution.unsupported
coresys.os._available = True coresys.os._available = True
await operating_system() assert coresys.os.available
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
)
await operating_system() await operating_system()
assert operating_system.reason not in coresys.resolution.unsupported assert operating_system.reason not in coresys.resolution.unsupported