diff options
author | Pablo Marcos Oltra <pablo.marcos.oltra@gmail.com> | 2020-06-11 13:24:41 +0200 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-10-09 02:04:26 +0530 |
commit | cbcb554ae78095b7de60fc13af6553b5e23a552a (patch) | |
tree | 4e81d977549d4a659fb826fed057c2dad00acd20 | |
parent | eececd6185c2c5470f39659190a1553bfb29e60a (diff) |
Fix distro check for focal and Python >= 3.8
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/634>
-rw-r--r-- | cerbero/utils/__init__.py | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/cerbero/utils/__init__.py b/cerbero/utils/__init__.py index ed5dd11e..9c53653f 100644 --- a/cerbero/utils/__init__.py +++ b/cerbero/utils/__init__.py @@ -188,43 +188,47 @@ Terminating.''', file=sys.stderr) if d[0] in ['Ubuntu', 'debian', 'Debian GNU/Linux', 'LinuxMint']: distro = Distro.DEBIAN - if d[2] in ['maverick', 'isadora']: + distro_version = d[2].lower() + split_str = d[2].split() + if split_str: + distro_version = split_str[0].lower() + if distro_version in ['maverick', 'isadora']: distro_version = DistroVersion.UBUNTU_MAVERICK - elif d[2] in ['lucid', 'julia']: + elif distro_version in ['lucid', 'julia']: distro_version = DistroVersion.UBUNTU_LUCID - elif d[2] in ['natty', 'katya']: + elif distro_version in ['natty', 'katya']: distro_version = DistroVersion.UBUNTU_NATTY - elif d[2] in ['oneiric', 'lisa']: + elif distro_version in ['oneiric', 'lisa']: distro_version = DistroVersion.UBUNTU_ONEIRIC - elif d[2] in ['precise', 'maya']: + elif distro_version in ['precise', 'maya']: distro_version = DistroVersion.UBUNTU_PRECISE - elif d[2] in ['quantal', 'nadia']: + elif distro_version in ['quantal', 'nadia']: distro_version = DistroVersion.UBUNTU_QUANTAL - elif d[2] in ['raring', 'olivia']: + elif distro_version in ['raring', 'olivia']: distro_version = DistroVersion.UBUNTU_RARING - elif d[2] in ['saucy', 'petra']: + elif distro_version in ['saucy', 'petra']: distro_version = DistroVersion.UBUNTU_SAUCY - elif d[2] in ['trusty', 'qiana', 'rebecca']: + elif distro_version in ['trusty', 'qiana', 'rebecca']: distro_version = DistroVersion.UBUNTU_TRUSTY - elif d[2] in ['utopic']: + elif distro_version in ['utopic']: distro_version = DistroVersion.UBUNTU_UTOPIC - elif d[2] in ['vivid']: + elif distro_version in ['vivid']: distro_version = DistroVersion.UBUNTU_VIVID - elif d[2] in ['wily']: + elif distro_version in ['wily']: distro_version = DistroVersion.UBUNTU_WILY - elif d[2] in ['xenial', 'sarah', 'serena', 'sonya', 'sylvia']: + elif distro_version in ['xenial', 'sarah', 'serena', 'sonya', 'sylvia']: distro_version = DistroVersion.UBUNTU_XENIAL - elif d[2] in ['artful']: + elif distro_version in ['artful']: distro_version = DistroVersion.UBUNTU_ARTFUL - elif d[2] in ['bionic', 'tara', 'tessa']: + elif distro_version in ['bionic', 'tara', 'tessa', 'tina', 'tricia']: distro_version = DistroVersion.UBUNTU_BIONIC - elif d[2] in ['cosmic']: + elif distro_version in ['cosmic']: distro_version = DistroVersion.UBUNTU_COSMIC - elif d[2] in ['disco']: + elif distro_version in ['disco']: distro_version = DistroVersion.UBUNTU_DISCO - elif d[2] in ['eoan']: + elif distro_version in ['eoan']: distro_version = DistroVersion.UBUNTU_EOAN - elif d[2] in ['focal']: + elif distro_version in ['focal']: distro_version = DistroVersion.UBUNTU_FOCAL elif d[1].startswith('6.'): distro_version = DistroVersion.DEBIAN_SQUEEZE |