]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
script/build-with-container: be consistent with naming in distro kinds
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 8 Oct 2025 14:23:25 +0000 (10:23 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 8 Oct 2025 23:31:35 +0000 (19:31 -0400)
Update the DistroKind enum and related items so that the naming is
applied consistently. That is: the canonical (no pun indented) form
of the name is "<name><version>" and codenames, such as "jammy" or
"bookworm" are aliases. This matches the previously existing code.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit ac11a80a63ab1909fbdf682d830acde96856f502)

src/script/build-with-container.py

index 7fd50ea0fc03d036237206f7361e342d9c0ddbab..b121146a4878264f43dce760a3396fe38bdb61fa 100755 (executable)
@@ -109,7 +109,7 @@ class DistroKind(StrEnum):
     ROCKY10 = "rocky10"
     UBUNTU2204 = "ubuntu22.04"
     UBUNTU2404 = "ubuntu24.04"
-    BOOKWORM = "bookworm"
+    DEBIAN12 = "debian12"
 
     @classmethod
     def uses_dnf(cls):
@@ -148,7 +148,9 @@ class DistroKind(StrEnum):
             str(cls.UBUNTU2404): cls.UBUNTU2404,
             "ubuntu-noble": cls.UBUNTU2404,
             "noble": cls.UBUNTU2404,
-            str(cls.BOOKWORM): cls.BOOKWORM,
+            str(cls.DEBIAN12): cls.DEBIAN12,
+            "debian-bookworm": cls.DEBIAN12,
+            "bookworm": cls.DEBIAN12,
         }
 
     @classmethod
@@ -165,7 +167,7 @@ class DefaultImage(StrEnum):
     ROCKY10 = "docker.io/rockylinux/rockylinux:10"
     UBUNTU2204 = "docker.io/ubuntu:22.04"
     UBUNTU2404 = "docker.io/ubuntu:24.04"
-    BOOKWORM = "docker.io/debian:bookworm"
+    DEBIAN12 = "docker.io/debian:bookworm"
 
 
 class CommandFailed(Exception):