summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartłomiej Kurzeja <bartlomiej@kurzeja.it>2021-06-21 14:40:22 +0200
committerTim-Philipp Müller <tim@centricular.com>2021-06-22 14:19:35 +0100
commitb77b3c6521ff9d3825ac57db6d7564e0b2c4fc66 (patch)
tree45201a78aafa70900865874901d4c5460dd8c174
parent001f78a2a917842b15b8ec4c0de217625853983f (diff)
utils: Autogenerate Debian versions
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/710>
-rw-r--r--cerbero/enums.py1
-rw-r--r--cerbero/utils/__init__.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/cerbero/enums.py b/cerbero/enums.py
index c17f5f8f..2778a539 100644
--- a/cerbero/enums.py
+++ b/cerbero/enums.py
@@ -78,6 +78,7 @@ class DistroVersion:
DEBIAN_BUSTER = 'debian_10_buster'
DEBIAN_BULLSEYE = 'debian_11_bullseye'
DEBIAN_SID = 'debian_99_sid'
+ # further debian versions are generated automatically
UBUNTU_LUCID = 'ubuntu_10_04_lucid'
UBUNTU_MAVERICK = 'ubuntu_10_10_maverick'
UBUNTU_NATTY = 'ubuntu_11_04_natty'
diff --git a/cerbero/utils/__init__.py b/cerbero/utils/__init__.py
index 0115e0e5..0b30b2cf 100644
--- a/cerbero/utils/__init__.py
+++ b/cerbero/utils/__init__.py
@@ -245,6 +245,8 @@ Terminating.''', file=sys.stderr)
distro_version = DistroVersion.DEBIAN_BULLSEYE
elif d[1] == 'unstable' and d[2] == 'sid':
distro_version = DistroVersion.DEBIAN_SID
+ elif d[0] in ['debian', 'Debian GNU/Linux']:
+ distro_version = "debian_{number:02d}_{name}".format(number=int(d[1]), name=d[2])
else:
raise FatalError("Distribution '%s' not supported" % str(d))
elif d[0] in ['RedHat', 'Fedora', 'CentOS', 'Red Hat Enterprise Linux Server', 'CentOS Linux']: