Make output of MakeVbmeta consistent

The order of items in `partitions` map is non-deterministic. To make
sure that builds are hermetic, sort the map before use.

Test: th
Bug: 332550989
Change-Id: I76c7037ef9f03904899339813819fcf985a7c893
This commit is contained in:
Kelvin Zhang
2024-04-15 09:43:07 -07:00
parent a40c6380a1
commit 1d9b3daad2
2 changed files with 2 additions and 16 deletions

View File

@@ -1524,7 +1524,7 @@ def GetAvbPartitionsArg(partitions,
AVB_ARG_NAME_CHAIN_PARTITION: []
}
for partition, path in partitions.items():
for partition, path in sorted(partitions.items()):
avb_partition_arg = GetAvbPartitionArg(partition, path, info_dict)
if not avb_partition_arg:
continue
@@ -1612,7 +1612,7 @@ def BuildVBMeta(image_path, partitions, name, needed_partitions,
"avb_custom_vbmeta_images_partition_list", "").strip().split()]
avb_partitions = {}
for partition, path in partitions.items():
for partition, path in sorted(partitions.items()):
if partition not in needed_partitions:
continue
assert (partition in AVB_PARTITIONS or