diff options
author | Gilad Arnold <garnold@chromium.org> | 2013-08-22 16:59:48 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-08-26 16:02:59 -0700 |
commit | 21a0250e767dd6fc787252b9cc05657405332774 (patch) | |
tree | 1152a5ae33e938bd3a6a670e025a7042138c5e13 /scripts/update_payload/payload.py | |
parent | 9753f3d28bda5d2abd7d17eb79022f7e02cb65b9 (diff) |
paycheck: allow to pass an explicit path to bspatch
The bspatch binary is used when applying update payloads. By default, we
were using whatever bspatch that was found via path expansion in
os.execvp, however there are cases where we want to be specific about
where the bspatch binary is that we need to be using (such as during
paygen runs).
BUG=chromium:277072
TEST=Non-default bspatch binary used
Change-Id: I85ffd28aeb26938cbf5ea428fa97d29af0353a7d
Reviewed-on: https://gerrit.chromium.org/gerrit/66736
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Diffstat (limited to 'scripts/update_payload/payload.py')
-rw-r--r-- | scripts/update_payload/payload.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/update_payload/payload.py b/scripts/update_payload/payload.py index 0bac0915..b13aa111 100644 --- a/scripts/update_payload/payload.py +++ b/scripts/update_payload/payload.py @@ -232,7 +232,7 @@ class Payload(object): report_out_file=report_out_file) def Apply(self, new_kernel_part, new_rootfs_part, old_kernel_part=None, - old_rootfs_part=None, bsdiff_in_place=True, + old_rootfs_part=None, bsdiff_in_place=True, bspatch_path=None, truncate_to_expected_size=True): """Applies the update payload. @@ -242,6 +242,7 @@ class Payload(object): old_kernel_part: name of source kernel partition file (optional) old_rootfs_part: name of source rootfs partition file (optional) bsdiff_in_place: whether to perform BSDIFF operations in-place (optional) + bspatch_path: path to the bspatch binary (optional) truncate_to_expected_size: whether to truncate the resulting partitions to their expected sizes, as specified in the payload (optional) @@ -253,7 +254,7 @@ class Payload(object): # Create a short-lived payload applier object and run it. helper = applier.PayloadApplier( - self, bsdiff_in_place=bsdiff_in_place, + self, bsdiff_in_place=bsdiff_in_place, bspatch_path=bspatch_path, truncate_to_expected_size=truncate_to_expected_size) helper.Run(new_kernel_part, new_rootfs_part, old_kernel_part=old_kernel_part, |