deploy_chrome: Fix a bug where --target-dir wasn't honored correctly
Previously, _CHROME_DIR was referenced when changing permissions
of files copied to the target device. This patch fixes this problem
by using self.options.target_dir instead.
BUG=734898
TEST=deploy_chrome --target-dir=... works from the first run
Change-Id: I342a5670b832bf626a03c03ed5be81f63ab9e064
Reviewed-on: https://chromium-review.googlesource.com/541000
Commit-Ready: Satoru Takabayashi <satorux@google.com>
Tested-by: Satoru Takabayashi <satorux@google.com>
Reviewed-by: Ryan Cui <rcui@google.com>
diff --git a/scripts/deploy_chrome.py b/scripts/deploy_chrome.py
index e9b3d32..832eee5 100644
--- a/scripts/deploy_chrome.py
+++ b/scripts/deploy_chrome.py
@@ -258,8 +258,6 @@
old_dbus_checksums = self._GetDBusChecksums()
logging.info('Copying Chrome to %s on device...', self.options.target_dir)
- # Show the output (status) for this command.
- dest_path = _CHROME_DIR
# CopyToDevice will fall back to scp if rsync is corrupted on stateful.
# This does not work for deploy.
if not self.device.HasRsync():
@@ -277,7 +275,7 @@
if p.mode:
# Set mode if necessary.
self.device.RunCommand('chmod %o %s/%s' % (
- p.mode, dest_path, p.src if not p.dest else p.dest))
+ p.mode, self.options.target_dir, p.src if not p.dest else p.dest))
new_dbus_checksums = self._GetDBusChecksums()
if old_dbus_checksums != new_dbus_checksums: