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
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 264c2d8..9771992 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -1524,7 +1524,7 @@
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 @@
"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