[PATCH] sb/linux.py: Simplify "distro" determination
Chris Johns
chrisj at rtems.org
Sun Jan 23 22:44:36 UTC 2022
I do not use Linux enough to know if this is OK.
I have no problem with this being pushed if other Linux users are happy.
Chtis
On 20/1/22 11:03 pm, Sebastian Huber wrote:
> This fixes an issue on Debian 11 which contains "Debian" in /etc/issue
> (captital D).
> ---
> source-builder/sb/linux.py | 10 +++-------
> 1 file 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'),
More information about the devel
mailing list