aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaligh Uddin <baligh@google.com>2018-03-08 15:50:15 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-03-08 15:50:15 +0000
commit1617db36afae0a35a3ef44085bf6f79c74a958f1 (patch)
tree5e69a4cf7b58efe29d95ddb88106b9c1db4f67af
parent2bff9a7c7911469d41f1330e20a0876c39c9eb16 (diff)
parentc63626b4a31d202f304e56f22f6d66b00f61f60c (diff)
downloadbuild-o-mr1-iot-preview-7.tar.gz
Merge "releasetools: Fix the broken validate_target_files.py."android-o-mr1-iot-preview-7o-mr1-iot-preview-7
-rwxr-xr-xtools/releasetools/validate_target_files.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/releasetools/validate_target_files.py b/tools/releasetools/validate_target_files.py
index f417129626..db1ba2eb65 100755
--- a/tools/releasetools/validate_target_files.py
+++ b/tools/releasetools/validate_target_files.py
@@ -27,6 +27,7 @@ import logging
import os.path
import re
import sys
+import zipfile
import common
@@ -61,7 +62,10 @@ def ValidateFileConsistency(input_zip, input_tmp):
def CheckAllFiles(which):
logging.info('Checking %s image.', which)
- image = common.GetSparseImage(which, input_tmp, input_zip)
+ # Allow having shared blocks when loading the sparse image, because allowing
+ # that doesn't affect the checks below (we will have all the blocks on file,
+ # unless it's skipped due to the holes).
+ image = common.GetSparseImage(which, input_tmp, input_zip, True)
prefix = '/' + which
for entry in image.file_map:
# Skip entries like '__NONZERO-0'.