Bug 1344244 - Part 4: Homebrew includes |brew cask| directly now. r=glandium
authorNick Alexander <nalexander@mozilla.com>
Wed, 05 Jul 2017 17:05:25 -0700
changeset 369510 4f056c7650c754654c19fa6ae8409a4fa71f11f8
parent 369509 0bae2cd791690a4ed325dc651c5cdf2d113b7f80
child 369511 0ee162368b58416628490ee3cd97e3f7f6bf9b77
push id32198
push userryanvm@gmail.com
push dateWed, 19 Jul 2017 13:22:22 +0000
treeherdermozilla-central@a1ea69a3a0a7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1344244
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1344244 - Part 4: Homebrew includes |brew cask| directly now. r=glandium There's no need to install the caskroom bits for Homebrew now, allowing to fix Java installation on Mac OS X and simplify the code at the same time. MozReview-Commit-ID: 1Ssjm4YRrPQ
python/mozboot/mozboot/osx.py
--- a/python/mozboot/mozboot/osx.py
+++ b/python/mozboot/mozboot/osx.py
@@ -285,18 +285,18 @@ class OSXBootstrapper(BaseBootstrapper):
         self.brew = self.which('brew')
         assert self.brew is not None
         cmd = [self.brew] + extra_brew_args
 
         installed = self.check_output(cmd + ['list']).split()
 
         printed = False
 
-        for name, package in packages:
-            if name in installed:
+        for package in packages:
+            if package in installed:
                 continue
 
             if not printed:
                 print(PACKAGE_MANAGER_PACKAGES % ('Homebrew',))
                 printed = True
 
             subprocess.check_call(cmd + ['install', package])
 
@@ -307,48 +307,47 @@ class OSXBootstrapper(BaseBootstrapper):
         return self._ensure_homebrew_packages(casks, extra_brew_args=['cask'])
 
     def ensure_homebrew_system_packages(self):
         packages = [
             # We need to install Python because Mercurial requires the Python
             # development headers which are missing from OS X (at least on
             # 10.8) and because the build system wants a version newer than
             # what Apple ships.
-            ('python', 'python'),
-            ('mercurial', 'mercurial'),
-            ('git', 'git'),
-            ('autoconf@2.13', 'autoconf@2.13'),
-            ('gnu-tar', 'gnu-tar'),
-            ('watchman', 'watchman',),
-            ('terminal-notifier', 'terminal-notifier')
+            'python',
+            'mercurial',
+            'git',
+            'autoconf@2.13',
+            'gnu-tar',
+            'watchman',
+            'terminal-notifier',
         ]
         self._ensure_homebrew_packages(packages)
 
     def ensure_homebrew_browser_packages(self, artifact_mode=False):
         # TODO: Figure out what not to install for artifact mode
         packages = [
-            ('yasm', 'yasm'),
-            ('llvm', 'llvm'),
+            'llvm',
+            'yasm',
         ]
         self._ensure_homebrew_packages(packages)
 
     def ensure_homebrew_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.
 
         # 1. System packages.
         packages = [
-            ('brew-cask', 'caskroom/cask/brew-cask'),  # For installing Java later.
-            ('wget', 'wget'),
+            'wget',
         ]
         self._ensure_homebrew_packages(packages)
 
         casks = [
-            ('java', 'java'),
+            'java',
         ]
         installed = self._ensure_homebrew_casks(casks)
         if installed:
             print(JAVA_LICENSE_NOTICE)  # We accepted a license agreement for the user.
 
         is_64bits = sys.maxsize > 2**32
         if not is_64bits:
             raise Exception('You need a 64-bit version of Mac OS X to build Firefox for Android.')