RESTRICT AUTOMERGE Uses a per-partition fingerprint for building images and avb_salt.
This causes the output image files of a merged build to be identical
to the image files of the input partial builds, for each images in
PARTITIONS_WITH_CARE_MAP.
Test: python -m unittest test_common
Test: `m dist`; `unzip out/dist/target_files.zip IMAGES/\*`;
`zip -d out/dist/target_files.zip IMAGES/\*`
`add_img_to_target_files -a out/dist/target_files.zip`.
Verify that the rebuilt images are identical to the deleted ones.
Test: Build a merged target (using merge_target_files.py). Verify that
the partial target-files.zip IMAGES are identical to the merged
target-files.zip IMAGES for PARTITIONS_WITH_CARE_MAP images.
Bug: 150405807
Change-Id: I5fdf5783c1aff9c14cf5408090389b1f65b69ca6
(cherry picked from commit d5fe862628
)
This commit is contained in:
@@ -338,7 +338,7 @@ def CreateImage(input_dir, info_dict, what, output_file, block_list=None):
|
||||
# Use repeatable ext4 FS UUID and hash_seed UUID (based on partition name and
|
||||
# build fingerprint).
|
||||
build_info = common.BuildInfo(info_dict)
|
||||
uuid_seed = what + "-" + build_info.fingerprint
|
||||
uuid_seed = what + "-" + build_info.GetPartitionFingerprint(what)
|
||||
image_props["uuid"] = str(uuid.uuid5(uuid.NAMESPACE_URL, uuid_seed))
|
||||
hash_seed = "hash_seed-" + uuid_seed
|
||||
image_props["hash_seed"] = str(uuid.uuid5(uuid.NAMESPACE_URL, hash_seed))
|
||||
|
Reference in New Issue
Block a user