Index: build/android/play_services/update.py |
diff --git a/build/android/play_services/update.py b/build/android/play_services/update.py |
index 9b97ed5c6bff776ed6149d08668350ca01f6fed7..8a703254babce191dd330944d337425097bc22c5 100755 |
--- a/build/android/play_services/update.py |
+++ b/build/android/play_services/update.py |
@@ -18,12 +18,14 @@ import tempfile |
import zipfile |
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) |
+import devil_chromium |
from devil.utils import cmd_helper |
from play_services import utils |
from pylib import constants |
+from pylib.constants import host_paths |
from pylib.utils import logging_utils |
-sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT, 'build')) |
+sys.path.append(os.path.join(host_paths.DIR_SOURCE_ROOT, 'build')) |
import find_depot_tools # pylint: disable=import-error,unused-import |
import breakpad |
import download_from_google_storage |
@@ -32,7 +34,7 @@ import upload_to_google_storage |
# Directory where the SHA1 files for the zip and the license are stored |
# It should be managed by git to provided information about new versions. |
-SHA1_DIRECTORY = os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'android', |
+SHA1_DIRECTORY = os.path.join(host_paths.DIR_SOURCE_ROOT, 'build', 'android', |
'play_services') |
# Default bucket used for storing the files. |
@@ -40,7 +42,7 @@ GMS_CLOUD_STORAGE = 'chromium-android-tools/play-services' |
# Path to the default configuration file. It exposes the currently installed |
# version of the library in a human readable way. |
-CONFIG_DEFAULT_PATH = os.path.join(constants.DIR_SOURCE_ROOT, 'build', |
+CONFIG_DEFAULT_PATH = os.path.join(host_paths.DIR_SOURCE_ROOT, 'build', |
'android', 'play_services', 'config.json') |
LICENSE_FILE_NAME = 'LICENSE' |
@@ -93,6 +95,7 @@ def main(raw_args): |
if args.verbose: |
logging.basicConfig(level=logging.DEBUG) |
logging_utils.ColorStreamHandler.MakeDefault(not _IsBotEnvironment()) |
+ devil_chromium.Initialize() |
return args.func(args) |
@@ -263,7 +266,7 @@ def Upload(args): |
config = utils.ConfigParser(args.config) |
paths = PlayServicesPaths(args.sdk_root, config.version_xml_path) |
- if not args.skip_git and utils.IsRepoDirty(constants.DIR_SOURCE_ROOT): |
+ if not args.skip_git and utils.IsRepoDirty(host_paths.DIR_SOURCE_ROOT): |
logging.error('The repo is dirty. Please commit or stash your changes.') |
return -1 |
@@ -306,7 +309,7 @@ def Upload(args): |
if not args.skip_git: |
commit_message = ('Update the Google Play services dependency to %s\n' |
'\n') % new_version_number |
- utils.MakeLocalCommit(constants.DIR_SOURCE_ROOT, |
+ utils.MakeLocalCommit(host_paths.DIR_SOURCE_ROOT, |
[new_lib_zip_sha1, new_license_sha1, config.path], |
commit_message) |