Fix ./mach bootstrap failure in debian (#31276)

Do not install `libgstreamer-plugins-good1.0-dev` on debian,
install only on ubuntu.
This commit is contained in:
atbrakhi 2024-02-07 06:18:40 +01:00 committed by GitHub
parent d8958f9693
commit ba1803d30a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,12 +154,18 @@ class Linux(Base):
def install_non_gstreamer_dependencies(self, force: bool) -> bool:
install = False
pkgs = []
if self.distro in ['Ubuntu', 'Debian GNU/Linux', 'Raspbian GNU/Linux']:
if self.distro in ['Ubuntu', 'Raspbian GNU/Linux']:
command = ['apt-get', 'install']
pkgs = APT_PKGS
if subprocess.call(['dpkg', '-s'] + pkgs, shell=True,
stdout=subprocess.PIPE, stderr=subprocess.PIPE) != 0:
install = True
elif self.distro == 'Debian GNU/Linux':
command = ['apt-get', 'install']
pkgs = [pkg for pkg in APT_PKGS if pkg != 'libgstreamer-plugins-good1.0-dev']
if subprocess.call(['dpkg', '-s'] + pkgs, shell=True,
stdout=subprocess.PIPE, stderr=subprocess.PIPE) != 0:
install = True
elif self.distro in ['CentOS', 'CentOS Linux', 'Fedora', 'Fedora Linux', 'Fedora Linux Asahi Remix']:
installed_pkgs = str(subprocess.check_output(['rpm', '-qa'])).replace('\n', '|')
pkgs = DNF_PKGS