diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-01-20 12:48:53 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-01-24 07:56:16 +0100 |
commit | 09b84c4c2ab1abddc3f06f98db3170eff6a8edd1 (patch) | |
tree | a42d8d58dff1f88ca7b3c9a4210f2f2c6af7bfa4 /source-builder/sb | |
parent | rtems-tools-6.cfg: Bump hash to get new INI files (diff) | |
download | rtems-source-builder-09b84c4c2ab1abddc3f06f98db3170eff6a8edd1.tar.bz2 |
sb/linux.py: Simplify "distro" determination
This fixes an issue on Debian 11 which contains "Debian" in /etc/issue
(capital D).
Diffstat (limited to 'source-builder/sb')
-rw-r--r-- | source-builder/sb/linux.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source-builder/sb/linux.py b/source-builder/sb/linux.py index d89377b..d71ac39 100644 --- a/source-builder/sb/linux.py +++ b/source-builder/sb/linux.py @@ -76,20 +76,16 @@ def load(): except: pass + distro = distro.lower() + # Manage distro aliases if distro in ['centos']: distro = 'redhat' elif distro in ['fedora']: if distro_ver < 17: distro = 'redhat' - elif distro in ['centos', 'fedora']: - distro = 'redhat' - elif distro in ['Ubuntu', 'ubuntu', 'MX', 'LinuxMint', 'linuxmint']: + elif distro in ['ubuntu', 'mx', 'linuxmint']: distro = 'debian' - elif distro in ['Arch']: - distro = 'arch' - elif distro in ['SuSE']: - distro = 'suse' variations = { 'debian' : { '__bzip2': ('exe', 'required', '/bin/bzip2'), |