Merge "releasetools: Fix the broken validate_target_files.py." am: 1617db36af

am: 946752cb24

Change-Id: Id1f96e9c03a2154f707598ab0e9d13df1fe77136
This commit is contained in:
Baligh Uddin 2018-03-08 16:07:48 +00:00 committed by android-build-merger
commit 8c7a2bb360
1 changed files with 5 additions and 1 deletions

View File

@ -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'.