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

Unified Diff: build/android/gyp/util/md5_check.py

Issue 14254005: [Android] Make gyp/apk_install.py resilient to user actions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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 | « build/android/gyp/apk_install.py ('k') | build/android/gyp/util/md5_check_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/util/md5_check.py
diff --git a/build/android/gyp/util/md5_check.py b/build/android/gyp/util/md5_check.py
index acf707c283c30f1289a5ea0cf5b71fa15d0562c1..d45bb94d2afc57e4e809762826d69fe0fa85e890 100644
--- a/build/android/gyp/util/md5_check.py
+++ b/build/android/gyp/util/md5_check.py
@@ -7,18 +7,21 @@ import os
def CallAndRecordIfStale(
- function, record_path=None, input_paths=[], input_strings=[]):
+ function, record_path=None, input_paths=[], input_strings=[], force=False):
"""Calls function if the md5sum of the input paths/strings has changed.
The md5sum of the inputs is compared with the one stored in record_path. If
this has changed (or the record doesn't exist), function will be called and
the new md5sum will be recorded.
+
+ If force is True, the function will be called regardless of whether the
+ md5sum is out of date.
"""
md5_checker = _Md5Checker(
record_path=record_path,
input_paths=input_paths,
input_strings=input_strings)
- if md5_checker.IsStale():
+ if force or md5_checker.IsStale():
function()
md5_checker.Write()
« no previous file with comments | « build/android/gyp/apk_install.py ('k') | build/android/gyp/util/md5_check_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698