Merge "Disable imgdiff for non-AB OTA"
This commit is contained in:
@@ -48,17 +48,12 @@ def GetBlockDifferences(target_zip, source_zip, target_info, source_info,
|
|||||||
# if the filesystem is ext4.
|
# if the filesystem is ext4.
|
||||||
partition_source_info = source_info["fstab"]["/" + name]
|
partition_source_info = source_info["fstab"]["/" + name]
|
||||||
check_first_block = partition_source_info.fs_type == "ext4"
|
check_first_block = partition_source_info.fs_type == "ext4"
|
||||||
# Disable using imgdiff for squashfs. 'imgdiff -z' expects input files to be
|
# Disable imgdiff because it relies on zlib to produce stable output
|
||||||
# in zip formats. However with squashfs, a) all files are compressed in LZ4;
|
# across different versions, which is often not the case.
|
||||||
# b) the blocks listed in block map may not contain all the bytes for a
|
|
||||||
# given file (because they're rounded to be 4K-aligned).
|
|
||||||
partition_target_info = target_info["fstab"]["/" + name]
|
|
||||||
disable_imgdiff = (partition_source_info.fs_type == "squashfs" or
|
|
||||||
partition_target_info.fs_type == "squashfs")
|
|
||||||
return common.BlockDifference(name, partition_tgt, partition_src,
|
return common.BlockDifference(name, partition_tgt, partition_src,
|
||||||
check_first_block,
|
check_first_block,
|
||||||
version=blockimgdiff_version,
|
version=blockimgdiff_version,
|
||||||
disable_imgdiff=disable_imgdiff)
|
disable_imgdiff=True)
|
||||||
|
|
||||||
if source_zip:
|
if source_zip:
|
||||||
# See notes in common.GetUserImage()
|
# See notes in common.GetUserImage()
|
||||||
@@ -409,7 +404,7 @@ else if get_stage("%(bcb_dev)s") != "3/3" then
|
|||||||
if updating_boot:
|
if updating_boot:
|
||||||
boot_type, boot_device_expr = common.GetTypeAndDeviceExpr("/boot",
|
boot_type, boot_device_expr = common.GetTypeAndDeviceExpr("/boot",
|
||||||
source_info)
|
source_info)
|
||||||
d = common.Difference(target_boot, source_boot)
|
d = common.Difference(target_boot, source_boot, "bsdiff")
|
||||||
_, _, d = d.ComputePatch()
|
_, _, d = d.ComputePatch()
|
||||||
if d is None:
|
if d is None:
|
||||||
include_full_boot = True
|
include_full_boot = True
|
||||||
|
Reference in New Issue
Block a user