diff --git a/mkosi/distributions/__init__.py b/mkosi/distributions/__init__.py index e152e6dfb..4d7bb4b3c 100644 --- a/mkosi/distributions/__init__.py +++ b/mkosi/distributions/__init__.py @@ -188,7 +188,7 @@ def detect_distribution(root: Path = Path("/")) -> tuple[Optional[Distribution], if d is not None: break - if d in {Distribution.debian, Distribution.ubuntu, Distribution.kali} and version_codename: + if d and d.is_apt_distribution() and version_codename: version_id = version_codename return d, version_id diff --git a/mkosi/distributions/debian.py b/mkosi/distributions/debian.py index 7720f583f..b3daf4c92 100644 --- a/mkosi/distributions/debian.py +++ b/mkosi/distributions/debian.py @@ -240,7 +240,7 @@ def architecture(cls, arch: Architecture) -> str: }.get(arch) # fmt: skip if not a: - die(f"Architecture {arch} is not supported by Debian") + die(f"Architecture {arch} is not supported by {cls.pretty_name()}") return a