summaryrefslogtreecommitdiff
path: root/scripts/update_payload/format_utils.py
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2018-12-07 12:09:37 -0800
committerTao Bao <tbao@google.com>2018-12-14 10:45:33 -0800
commit1d9077f65d50cc19db82c514cd856e58a6e95fdf (patch)
tree88330634e780ac46f5422d09541c1255c5a1e8d4 /scripts/update_payload/format_utils.py
parent35410ede7a8ad111d7715c164ec5d859514ba2ee (diff)
Improve the logic for mapping target dynamic partitions.
While applying a retrofit update on a dynamic-partitions-enabled build, it should always use static target partitions. Otherwise reading them from the updated partition metadata would end up using mismatching info. This CL improves the logic in detecting and handling such a case. - It identifies a retrofit or regular update based on the absence of DynamicPartitionMetadata field. - Upon seeing that, it skips updating partition metadata for the target slot, and looks up target partitions as static partitions. - Source partitions will always be loaded according to the actual state. This CL also removes the re-mapping of the target partitions from InitPartitionMetadata(). It only needs to unmap those partitions, since they may become inconsistent with the updated metadata. However, it's unnecessary to re-map them, which will be done later as part of GetDynamicPartitionDevice(). Also updated tests to reflect this. Bug: 120775936 Test: update_engine_unittests Test: Apply an update with dynamic partitions; abort and resume. Test: Apply a retrofit update; abort and resume the update. Change-Id: Ic07bd98847e91a003101266e426c4d23666810f2
Diffstat (limited to 'scripts/update_payload/format_utils.py')
0 files changed, 0 insertions, 0 deletions