From d32936d6572a525e09c3e02682deff4f7342e586 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 17 May 2018 19:42:41 -0700 Subject: [PATCH] releasetools: Skip checking files with non-monotonic ranges. Bug: 79951743 Test: Run validate_target_files.py on target_files.zip that has non-monotonic ranges listed in IMAGES/system.map. Change-Id: I28d3ca6972d361362589cd51e60731af9994a551 --- tools/releasetools/validate_target_files.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/releasetools/validate_target_files.py b/tools/releasetools/validate_target_files.py index acd5b6e36e..886de26221 100755 --- a/tools/releasetools/validate_target_files.py +++ b/tools/releasetools/validate_target_files.py @@ -90,6 +90,12 @@ def ValidateFileConsistency(input_zip, input_tmp, info_dict): logging.warning('Skipping %s that has incomplete block list', entry) continue + # TODO(b/79951650): Handle files with non-monotonic ranges. + if not ranges.monotonic: + logging.warning( + 'Skipping %s that has non-monotonic ranges: %s', entry, ranges) + continue + blocks_sha1 = image.RangeSha1(ranges) # The filename under unpacked directory, such as SYSTEM/bin/sh.