]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Detect Azure Linux properly 2989/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 29 Aug 2024 20:29:03 +0000 (22:29 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 30 Aug 2024 08:20:41 +0000 (10:20 +0200)
Fixes #2988

mkosi/distributions/__init__.py

index eba9371e8722fa1b71c8e873149394508f38749a..10df0902a4600ac6038638b548b530fdb66932aa 100644 (file)
@@ -177,9 +177,13 @@ def detect_distribution() -> tuple[Optional[Distribution], Optional[str]]:
     version_id = os_release.get("VERSION_ID", None)
     version_codename = os_release.get("VERSION_CODENAME", None)
 
+    quirks = {
+        "azurelinux": Distribution.azure,
+    }
+
     d: Optional[Distribution] = None
     for the_id in [dist_id, *dist_id_like]:
-        d = Distribution.__members__.get(the_id, None)
+        d = Distribution.__members__.get(the_id, quirks.get(the_id))
         if d is not None:
             break