Merge "Specify --max_timestamp when calling brillo_update_payload." into oc-dev am: 4378910f30

am: d35542316d

Change-Id: I3a0096432cad3dad8fd283ace19fc21d64d9c42e
This commit is contained in:
Sen Jiang 2018-01-12 21:11:30 +00:00 committed by android-build-merger
commit 9d11ec7bdc
1 changed files with 5 additions and 0 deletions
tools/releasetools

View File

@ -1077,6 +1077,11 @@ def WriteABOTAPackageWithBrilloScript(target_file, output_file,
"--target_image", target_file]
if source_file is not None:
cmd.extend(["--source_image", source_file])
if OPTIONS.downgrade:
max_timestamp = GetBuildProp("ro.build.date.utc", OPTIONS.source_info_dict)
else:
max_timestamp = metadata["post-timestamp"]
cmd.extend(["--max_timestamp", max_timestamp])
p1 = common.Run(cmd, stdout=log_file, stderr=subprocess.STDOUT)
p1.communicate()
assert p1.returncode == 0, "brillo_update_payload generate failed"