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

Unified Diff: build/android/pylib/utils/md5sum.py

Issue 1303363005: When updating md5sum_bin, wipe the directory first (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check_return=Tue Created 5 years, 4 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 | build/android/pylib/utils/md5sum_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/md5sum.py
diff --git a/build/android/pylib/utils/md5sum.py b/build/android/pylib/utils/md5sum.py
index 2312d93ad39c940b59dd0e113b7113667c658632..2e0a89c328eae2a031c2e5f26eb4699e0239006d 100644
--- a/build/android/pylib/utils/md5sum.py
+++ b/build/android/pylib/utils/md5sum.py
@@ -95,6 +95,11 @@ def CalculateDeviceMd5Sums(paths, device):
# Push the binary only if it is found to not exist
# (faster than checking up-front).
if e.status == 2:
+ # If files were previously pushed as root (adbd running as root), trying
+ # to re-push as non-root causes the push command to report success, but
+ # actually fail. So, wipe the directory first.
+ device.RunShellCommand(['rm', '-rf', MD5SUM_DEVICE_LIB_PATH],
+ as_root=True, check_return=True)
device.adb.Push(md5sum_dist_path, MD5SUM_DEVICE_LIB_PATH)
out = device.RunShellCommand(md5sum_script, check_return=True)
else:
« no previous file with comments | « no previous file | build/android/pylib/utils/md5sum_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698