summaryrefslogtreecommitdiff
path: root/scripts/update_payload/checker.py
diff options
context:
space:
mode:
authorXiaochu Liu <xiaochu@chromium.org>2019-03-14 16:15:42 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-03-20 19:51:25 -0700
commit6cf8e675a37c3b61cea0d313f8006068a1b3190a (patch)
tree54a1a3b29cb4221454912fa6b1a420e30ee89d67 /scripts/update_payload/checker.py
parenta7add991ca54d16462c189e05deba08615123786 (diff)
update_payload: deprecate unused flags from paycheck.py
Some temporary workaround are placed to hack the parameters to some default value that the rest of the code is happy with. This CL removes them. part_sizes should be default None (it was default [None, None]). when part_sizes is None, part sizes are not checked (same behavior as [None, None]). src_part_paths should be default None (it was default [None, None]). when src_part_paths is None, we set args.assert_type=_TYPE_FULL (same behavior as [None, None]). dst_part_paths (out_dst_part_paths) should be default None (it was default [None, None]). when dst_part_paths (and out_dst_part_paths) is None, dargs is not set (same behavior as [None, None]). out_dst_part_paths is rarely used and we often chose to use dst_part_path. Old flags (deprecated) are removed as well. BUG=chromium:926045 TEST=test_paycheck.sh chromeos_11844.0.0_kevin-arcnext_canary-channel_full_kevin-mp.bin-6f7f58b3c9a1a84ea15ab67f84cd5387.signed chromeos_11844.0.0-11869.0.0_kevin-arcnext_canary-channel_delta_kevin-mp.bin-fc6014025415e0b5e780c0739a3b0461.signed chromeos_11869.0.0_kevin-arcnext_canary-channel_full_kevin-mp.bin-1be744e0723534e02084c762dea316c0.signed Change-Id: Ifdf872ddfa03d5759a8ee4021e296e4dc4571d9c Reviewed-on: https://chromium-review.googlesource.com/1525289 Commit-Ready: Xiaochu Liu <xiaochu@chromium.org> Tested-by: Xiaochu Liu <xiaochu@chromium.org> Reviewed-by: Nicolas Norvez <norvez@chromium.org>
Diffstat (limited to 'scripts/update_payload/checker.py')
-rw-r--r--scripts/update_payload/checker.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/update_payload/checker.py b/scripts/update_payload/checker.py
index 6d17fbe5..e4fec2d9 100644
--- a/scripts/update_payload/checker.py
+++ b/scripts/update_payload/checker.py
@@ -609,7 +609,7 @@ class PayloadChecker(object):
"""
self.major_version = self.payload.header.version
- part_sizes = collections.defaultdict(int, part_sizes)
+ part_sizes = part_sizes or collections.defaultdict(int)
manifest = self.payload.manifest
report.AddSection('manifest')
@@ -1372,7 +1372,7 @@ class PayloadChecker(object):
new_fs_usable_size = self.new_fs_sizes[part]
old_fs_usable_size = self.old_fs_sizes[part]
- if part_sizes.get(part, None):
+ if part_sizes is not None and part_sizes.get(part, None):
new_fs_usable_size = old_fs_usable_size = part_sizes[part]
# Infer the usable partition size when validating rootfs operations:
# - If rootfs partition size was provided, use that.