releasetools: Track the change to BuildInfo.
The global GetBuildProp() has been factored into BuildInfo class.
ota_from_target_files stderr: Traceback (most recent call last):
File "/tmp/otatest1734786148718419730/releasetools/ota_from_target_files.py", line 1509, in <module>
main(sys.argv[1:])
File "/tmp/otatest1734786148718419730/releasetools/ota_from_target_files.py", line 1421, in main
source_file=OPTIONS.incremental_source)
File "/tmp/otatest1734786148718419730/releasetools/ota_from_target_files.py", line 1117, in WriteABOTAPackageWithBrilloScript
max_timestamp = GetBuildProp("ro.build.date.utc", OPTIONS.source_info_dict)
NameError: global name 'GetBuildProp' is not defined
Test: Build an incremental A/B package with "--downgrade" flag.
Change-Id: I5c304c8b1ea79f3e5465b203bb990cbdffb9b328
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index 7e06e82..ccfc9f1 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -1152,7 +1152,7 @@
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)
+ max_timestamp = source_info.GetBuildProp("ro.build.date.utc")
else:
max_timestamp = metadata["post-timestamp"]
cmd.extend(["--max_timestamp", max_timestamp])