DO NOT MERGE Monotonic flag sets incorrectly in rangelib

After applying update_target_files_incr_ext4.sh, some files may end up
occupying unsorted block fragments. In one example, an apk file has the
block range [258768-259211,196604]. The monotonic flag in rangelib sets
incorrectly for this example and leads to a bad input file for imgdiff.
After fixing the flag, bsdiff is called instead of imgdiff and the
incremental OTA package generates successfully.

Bug: 28760775
Bug: 28053885
Change-Id: Ib841bf449ff6a29314fc4a1b8fba941a6dc532ac
(cherry picked from commit cd1e16a761)
This commit is contained in:
Tianjie Xu 2016-04-07 20:17:48 -07:00 committed by Tao Bao
parent 7e806813bb
commit 8d11597558
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ class RangeSet(object):
if last <= s:
last = s+1
else:
monotonic = True
monotonic = False
data.sort()
self.data = tuple(self._remove_pairs(data))
self.monotonic = monotonic