Merge "releasetools: Pass --virtual-ab to lpmake."

This commit is contained in:
David Anderson 2019-12-18 15:42:44 +00:00 committed by Gerrit Code Review
commit 2e44964719

View file

@ -76,6 +76,8 @@ def BuildSuperImageFromDict(info_dict, output):
"--super-name", info_dict["super_metadata_device"]] "--super-name", info_dict["super_metadata_device"]]
ab_update = info_dict.get("ab_update") == "true" ab_update = info_dict.get("ab_update") == "true"
virtual_ab = info_dict.get("virtual_ab") == "true"
virtual_ab_retrofit = info_dict.get("virtual_ab_retrofit") == "true"
retrofit = info_dict.get("dynamic_partition_retrofit") == "true" retrofit = info_dict.get("dynamic_partition_retrofit") == "true"
block_devices = shlex.split(info_dict.get("super_block_devices", "").strip()) block_devices = shlex.split(info_dict.get("super_block_devices", "").strip())
groups = shlex.split(info_dict.get("super_partition_groups", "").strip()) groups = shlex.split(info_dict.get("super_partition_groups", "").strip())
@ -89,6 +91,8 @@ def BuildSuperImageFromDict(info_dict, output):
if ab_update and retrofit: if ab_update and retrofit:
cmd.append("--auto-slot-suffixing") cmd.append("--auto-slot-suffixing")
if virtual_ab and not virtual_ab_retrofit:
cmd.append("--virtual-ab")
for device in block_devices: for device in block_devices:
size = info_dict["super_{}_device_size".format(device)] size = info_dict["super_{}_device_size".format(device)]