Bug 1143660 - Ascertain 2 blank lines between top-level elements. r=gps
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Wed, 18 Mar 2015 18:58:35 +0100
changeset 264732 9c7f64e83cd64607e67b90b07be5ed3982c90571
parent 264731 583035a90903b06c60e434f25f70a74bbfe82f4e
child 264733 8b2a72eea28a5d1ad15a1e046dc89fead326128e
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1143660
milestone39.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 1143660 - Ascertain 2 blank lines between top-level elements. r=gps
python/mozboot/mozboot/android.py
python/mozboot/mozboot/archlinux.py
python/mozboot/mozboot/bootstrap.py
python/mozboot/mozboot/centos.py
python/mozboot/mozboot/debian.py
python/mozboot/mozboot/fedora.py
python/mozboot/mozboot/freebsd.py
python/mozboot/mozboot/gentoo.py
python/mozboot/mozboot/openbsd.py
python/mozboot/mozboot/osx.py
python/mozboot/mozboot/ubuntu.py
--- a/python/mozboot/mozboot/android.py
+++ b/python/mozboot/mozboot/android.py
@@ -4,16 +4,17 @@
 
 # If we add unicode_literals, Python 2.6.1 (required for OS X 10.6) breaks.
 from __future__ import print_function
 
 import errno
 import os
 import subprocess
 
+
 # These are the platform and build-tools versions for building
 # mobile/android, respectively. Try to keep these in synch with the
 # build system and Mozilla's automation.
 ANDROID_PLATFORM = 'android-21'
 ANDROID_BUILD_TOOLS_VERSION = '21.1.2'
 
 # These are the "Android packages" needed for building Firefox for Android.
 # Use |android list sdk --extended| to see these identifiers.
@@ -77,16 +78,17 @@ ac_add_options --with-android-ndk="%s"
 
 def check_output(*args, **kwargs):
     """Run subprocess.check_output even if Python doesn't provide it."""
     from base import BaseBootstrapper
     fn = getattr(subprocess, 'check_output', BaseBootstrapper._check_output)
 
     return fn(*args, **kwargs)
 
+
 def list_missing_android_packages(android_tool, packages):
     '''
     Use the given |android| tool to return the sub-list of Android
     |packages| given that are not installed.
     '''
     missing = []
 
     # There's no obvious way to see what's been installed already,
@@ -108,16 +110,17 @@ def list_missing_android_packages(androi
 
         for package in packages:
             if '"%s"' % package in line:
                 # Not installed!
                 missing.append(package)
 
     return missing
 
+
 def install_mobile_android_sdk_or_ndk(url, path):
     '''
     Fetch an Android SDK or NDK from |url| and unpack it into
     the given |path|.
 
     We expect wget to be installed and found on the system path.
 
     We use, and wget respects, https.  We could also include SHAs for a
@@ -153,16 +156,17 @@ def install_mobile_android_sdk_or_ndk(ur
         elif file.endswitch('.zip'):
             cmd = ['unzip']
         else:
             raise NotImplementedError("Don't know how to unpack file: %s" % file)
         subprocess.check_call(cmd + [os.path.join(download_path, file)])
     finally:
         os.chdir(old_path)
 
+
 def ensure_android_sdk_and_ndk(path, sdk_path, sdk_url, ndk_path, ndk_url):
     '''
     Ensure the Android SDK and NDK are found at the given paths.  If not, fetch
     and unpack the SDK and/or NDK from the given URLs into |path|.
     '''
 
     # It's not particularyl bad to overwrite the NDK toolchain, but it does take
     # a while to unpack, so let's avoid the disk activity if possible.  The SDK
@@ -175,16 +179,17 @@ def ensure_android_sdk_and_ndk(path, sdk
     # We don't want to blindly overwrite, since we use the |android| tool to
     # install additional parts of the Android toolchain.  If we overwrite,
     # we lose whatever Android packages the user may have already installed.
     if os.path.isdir(sdk_path):
         print(ANDROID_SDK_EXISTS % sdk_path)
     else:
         install_mobile_android_sdk_or_ndk(sdk_url, path)
 
+
 def ensure_android_packages(android_tool, packages=None):
     '''
     Use the given android tool (like 'android') to install required Android
     packages.
     '''
 
     if not packages:
         packages = ANDROID_PACKAGES
@@ -201,10 +206,11 @@ def ensure_android_packages(android_tool
         'update', 'sdk', '--no-ui',
         '--filter', ','.join(missing)])
 
     # Let's verify.
     failing = list_missing_android_packages(android_tool, packages=packages)
     if failing:
         raise Exception(MISSING_ANDROID_PACKAGES % (', '.join(missing), ', '.join(failing)))
 
+
 def suggest_mozconfig(sdk_path=None, ndk_path=None):
     print(MOBILE_ANDROID_MOZCONFIG_TEMPLATE % (sdk_path, ndk_path))
--- a/python/mozboot/mozboot/archlinux.py
+++ b/python/mozboot/mozboot/archlinux.py
@@ -5,16 +5,17 @@
 import os
 import sys
 import tempfile
 import subprocess
 import glob
 
 from mozboot.base import BaseBootstrapper
 
+
 class ArchlinuxBootstrapper(BaseBootstrapper):
     '''Archlinux experimental bootstrapper.'''
 
     SYSTEM_PACKAGES = [
         'autoconf2.13',
         'base-devel',
         'ccache',
         'mercurial',
--- a/python/mozboot/mozboot/bootstrap.py
+++ b/python/mozboot/mozboot/bootstrap.py
@@ -103,17 +103,16 @@ class Bootstrapper(object):
             args['flavor']  = platform.system()
 
         if cls is None:
             raise NotImplementedError('Bootstrap support is not yet available '
                                       'for your OS.')
 
         self.instance = cls(**args)
 
-
     def bootstrap(self):
         # Like ['1. Firefox for Desktop', '2. Firefox for Android'].
         labels = [ '%s. %s' % (i + 1, name) for (i, (name, _)) in enumerate(APPLICATIONS) ]
         prompt = APPLICATION_CHOICE % '\n'.join(labels)
         choice = self.instance.prompt_int(prompt=prompt, low=1, high=len(APPLICATIONS))
         name, application = APPLICATIONS[choice-1]
 
         self.instance.install_system_packages()
--- a/python/mozboot/mozboot/centos.py
+++ b/python/mozboot/mozboot/centos.py
@@ -1,16 +1,18 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import platform
 
+
 from mozboot.base import BaseBootstrapper
 
+
 class CentOSBootstrapper(BaseBootstrapper):
     def __init__(self, version, dist_id):
         BaseBootstrapper.__init__(self)
 
         self.version = version
         self.dist_id = dist_id
 
         self.group_packages = [
--- a/python/mozboot/mozboot/debian.py
+++ b/python/mozboot/mozboot/debian.py
@@ -2,16 +2,17 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import os
 import sys
 
 from mozboot.base import BaseBootstrapper
 
+
 class DebianBootstrapper(BaseBootstrapper):
     # These are common packages for all Debian-derived distros (such as
     # Ubuntu).
     COMMON_PACKAGES = [
         'autoconf2.13',
         'build-essential',
         'ccache',
         'mercurial',
--- a/python/mozboot/mozboot/fedora.py
+++ b/python/mozboot/mozboot/fedora.py
@@ -1,14 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from mozboot.base import BaseBootstrapper
 
+
 class FedoraBootstrapper(BaseBootstrapper):
     def __init__(self, version, dist_id):
         BaseBootstrapper.__init__(self)
 
         self.version = version
         self.dist_id = dist_id
 
         self.group_packages = [
--- a/python/mozboot/mozboot/freebsd.py
+++ b/python/mozboot/mozboot/freebsd.py
@@ -1,14 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from mozboot.base import BaseBootstrapper
 
+
 class FreeBSDBootstrapper(BaseBootstrapper):
     def __init__(self, version, flavor):
         BaseBootstrapper.__init__(self)
         self.version = int(version.split('.')[0])
         self.flavor  = flavor.lower()
 
         self.packages = [
             'autoconf213',
--- a/python/mozboot/mozboot/gentoo.py
+++ b/python/mozboot/mozboot/gentoo.py
@@ -1,14 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from mozboot.base import BaseBootstrapper
 
+
 class GentooBootstrapper(BaseBootstrapper):
     def __init__(self, version, dist_id):
         BaseBootstrapper.__init__(self)
 
         self.version = version
         self.dist_id = dist_id
 
     def install_system_packages(self):
--- a/python/mozboot/mozboot/openbsd.py
+++ b/python/mozboot/mozboot/openbsd.py
@@ -1,14 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from mozboot.base import BaseBootstrapper
 
+
 class OpenBSDBootstrapper(BaseBootstrapper):
     def __init__(self, version):
         BaseBootstrapper.__init__(self)
 
         self.packages = [
             'mercurial',
             'autoconf-2.13',
             'gmake',
--- a/python/mozboot/mozboot/osx.py
+++ b/python/mozboot/mozboot/osx.py
@@ -161,16 +161,17 @@ this bootstrap again.
 '''
 
 JAVA_LICENSE_NOTICE = '''
 We installed a recent Java toolchain for you. We agreed to the Oracle Java
 license for you by downloading the JDK. If this is unacceptable you should
 uninstall.
 '''
 
+
 class OSXBootstrapper(BaseBootstrapper):
     def __init__(self, version):
         BaseBootstrapper.__init__(self)
 
         self.os_version = StrictVersion(version)
 
         if self.os_version < StrictVersion('10.6'):
             raise Exception('OS X 10.6 or above is required.')
--- a/python/mozboot/mozboot/ubuntu.py
+++ b/python/mozboot/mozboot/ubuntu.py
@@ -1,22 +1,24 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import os
 
+
 from mozboot.debian import DebianBootstrapper
 
 
 MERCURIAL_PPA = '''
 Ubuntu does not provide a modern Mercurial in its package repository. So,
 we will install a PPA that does.
 '''.strip()
 
+
 # Ubuntu shares much logic with Debian, so it inherits from it.
 class UbuntuBootstrapper(DebianBootstrapper):
     DISTRO_PACKAGES = [
         # This contains add-apt-repository.
         'software-properties-common',
     ]
 
     def upgrade_mercurial(self, current):