Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1175)

Unified Diff: build/android/incremental_install/installer.py

Issue 1388863002: GN incremental install: Add a --no-cache flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inc-install-fix-2
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/incremental_install/installer.py
diff --git a/build/android/incremental_install/installer.py b/build/android/incremental_install/installer.py
index 55699f3d23f4dca55104ab42e0c96f786a1ff700..b3f72ad7bea6952d40b232e8482703a171484780 100755
--- a/build/android/incremental_install/installer.py
+++ b/build/android/incremental_install/installer.py
@@ -74,6 +74,12 @@ def main():
default=True,
dest='threading',
help='Do not install and push concurrently')
+ parser.add_argument('--no-cache',
+ action='store_false',
+ default=True,
+ dest='cache',
+ help='Do not use cached information about what files are '
+ 'currently on the target device.')
parser.add_argument('-v',
'--verbose',
dest='verbose_count',
@@ -177,6 +183,9 @@ def main():
cache_path = '%s/files-cache.json' % device_incremental_dir
def restore_cache():
+ if not args.cache:
+ logging.info('Ignoring device cache')
+ return
# Delete the cached file so that any exceptions cause the next attempt
# to re-compute md5s.
cmd = 'P=%s;cat $P 2>/dev/null && rm $P' % cache_path
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698