Skip to content

Commit

Permalink
Bug 1648555 - mach bootstrap installs libdrm-dev package on Ubunt…
Browse files Browse the repository at this point in the history
…u/Debian r=dmajor

Also delete a bunch of dead code that was apparently meant to be useful for subclassing, but there's no subclasses of `DebianBootstrapper` in tree.

Differential Revision: https://phabricator.services.mozilla.com/D82073
  • Loading branch information
Ricky Stewart committed Jul 16, 2020
1 parent fe88ab9 commit f34f1b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/setup/linux_32bit_build_on_64bit_OS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ These steps were verified to work as of June 2020
sudo apt install gcc-multilib g++-multilib libdbus-glib-1-dev:i386 \
libgtk2.0-dev:i386 libgtk-3-dev:i386 libpango1.0-dev:i386 libxt-dev:i386 \
libx11-xcb-dev:i386 libpulse-dev:i386
libx11-xcb-dev:i386 libpulse-dev:i386 libdrm-dev:i386
5. Create a file called ``mozconfig`` in the top-level directory of you
``mozilla-central`` checkout, containing at least the following:
Expand Down
19 changes: 4 additions & 15 deletions python/mozboot/mozboot/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ class DebianBootstrapper(
'zip',
]

# Subclasses can add packages to this variable to have them installed.
DISTRO_PACKAGES = []

# Ubuntu and Debian don't often differ, but they do for npm.
DEBIAN_PACKAGES = [
# Comment the npm package until Debian bring it back
Expand All @@ -59,6 +56,7 @@ class DebianBootstrapper(
'libcurl4-openssl-dev',
'libdbus-1-dev',
'libdbus-glib-1-dev',
'libdrm-dev',
'libgtk-3-dev',
'libgtk2.0-dev',
'libpulse-dev',
Expand All @@ -68,19 +66,13 @@ class DebianBootstrapper(
'yasm',
]

# Subclasses can add packages to this variable to have them installed.
BROWSER_DISTRO_PACKAGES = []

# These are common packages for building Firefox for Android
# (mobile/android) for all Debian-derived distros (such as Ubuntu).
MOBILE_ANDROID_COMMON_PACKAGES = [
'openjdk-8-jdk-headless', # Android's `sdkmanager` requires Java 1.8 exactly.
'wget', # For downloading the Android SDK and NDK.
]

# Subclasses can add packages to this variable to have them installed.
MOBILE_ANDROID_DISTRO_PACKAGES = []

def __init__(self, distro, version, dist_id, codename, **kwargs):
BaseBootstrapper.__init__(self, **kwargs)

Expand All @@ -89,7 +81,7 @@ def __init__(self, distro, version, dist_id, codename, **kwargs):
self.dist_id = dist_id
self.codename = codename

self.packages = self.COMMON_PACKAGES + self.DISTRO_PACKAGES
self.packages = list(self.COMMON_PACKAGES)
if self.distro == 'debian':
self.packages += self.DEBIAN_PACKAGES
# Due to the Python 2 EOL, newer versions of Ubuntu don't carry the
Expand All @@ -106,9 +98,6 @@ def __init__(self, distro, version, dist_id, codename, **kwargs):
self.packages.append('python-pip')

self.packages.append('python-dev')
self.browser_packages = self.BROWSER_COMMON_PACKAGES + self.BROWSER_DISTRO_PACKAGES
self.mobile_android_packages = self.MOBILE_ANDROID_COMMON_PACKAGES + \
self.MOBILE_ANDROID_DISTRO_PACKAGES

def install_system_packages(self):
# Python 3 may not be present on all distros. Search for it and
Expand Down Expand Up @@ -144,7 +133,7 @@ def install_mobile_android_artifact_mode_packages(self):

def ensure_browser_packages(self, artifact_mode=False):
# TODO: Figure out what not to install for artifact mode
self.apt_install(*self.browser_packages)
self.apt_install(*self.BROWSER_COMMON_PACKAGES)
modern = self.is_nasm_modern()
if not modern:
self.apt_install('nasm')
Expand All @@ -153,7 +142,7 @@ def ensure_mobile_android_packages(self, artifact_mode=False):
# Multi-part process:
# 1. System packages.
# 2. Android SDK. Android NDK only if we are not in artifact mode. Android packages.
self.apt_install(*self.mobile_android_packages)
self.apt_install(*self.MOBILE_ANDROID_COMMON_PACKAGES)

# 2. Android pieces.
self.ensure_java()
Expand Down

0 comments on commit f34f1b6

Please sign in to comment.