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

Unified Diff: build/android/gyp/process_resources.py

Issue 1830523003: 🌛 Consider resource names in md5_check for process_resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/gyp/process_resources.py
diff --git a/build/android/gyp/process_resources.py b/build/android/gyp/process_resources.py
index 9297a470d745c19880ed7167d60e1eb4a33445ae..375cfdb913f2153a704a77006d2003e793f8b2a1 100755
--- a/build/android/gyp/process_resources.py
+++ b/build/android/gyp/process_resources.py
@@ -477,9 +477,15 @@ def main(args):
input_paths.extend(options.dependencies_res_zips)
input_paths.extend(p for p in options.extra_r_text_files if os.path.exists(p))
- for d in options.resource_dirs:
- for root, _, filenames in os.walk(d):
- input_paths.extend(os.path.join(root, f) for f in filenames)
+ resource_names = []
+ for resource_dir in options.resource_dirs:
+ for resource_file in build_utils.FindInDirectory(resource_dir, '*'):
+ input_paths.append(resource_file)
+ resource_names.append(os.path.relpath(resource_file, resource_dir))
+
+ # Resource filenames matter to the output, so add them to strings as well.
+ # This matters if a file is renamed but not changed (http://crbug.com/597126).
+ input_strings.extend(sorted(resource_names))
build_utils.CallAndWriteDepfileIfStale(
lambda: _OnStaleMd5(options),
« 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