From 7837310e4ee3a464bb77c171dcbb9b07836991cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Veronika=20Hor=C3=A1=C4=8Dk=C5=AF?= Date: Sun, 30 Apr 2023 10:29:48 +0200 Subject: Fix installing dependencies on Fedora and remove usage of `distro.linux_distribution()` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `distro.linux_distribution()` is a deprecated function in the distro module. Signed-off-by: Veronika Horáčků --- python/servo/bootstrap.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'python/servo/bootstrap.py') diff --git a/python/servo/bootstrap.py b/python/servo/bootstrap.py index acf7c78acbb..3e1ec06f53e 100644 --- a/python/servo/bootstrap.py +++ b/python/servo/bootstrap.py @@ -39,7 +39,7 @@ def install_linux_deps(context, pkgs_ubuntu, pkgs_fedora, pkgs_void, force): pkgs = pkgs_ubuntu if subprocess.call(['dpkg', '-s'] + pkgs, stdout=PIPE, stderr=PIPE) != 0: install = True - elif context.distro in ['CentOS', 'CentOS Linux', 'Fedora']: + elif context.distro in ['CentOS', 'CentOS Linux', 'Fedora', 'Fedora Linux']: installed_pkgs = str(subprocess.check_output(['rpm', '-qa'])).replace('\n', '|') pkgs = pkgs_fedora for p in pkgs: @@ -196,9 +196,8 @@ LINUX_SPECIFIC_BOOTSTRAPPERS = { def get_linux_distribution(): - distrib, version, _ = distro.linux_distribution() - distrib = six.ensure_str(distrib) - version = six.ensure_str(version) + distrib = six.ensure_str(distro.name()) + version = six.ensure_str(distro.version()) if distrib in ['LinuxMint', 'Linux Mint', 'KDE neon']: if '.' in version: -- cgit v1.2.3