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
This commit is contained in:
Tao Bao 2018-01-22 11:35:00 -08:00
parent 7e7e6a3005
commit 2a12ed7dbd
1 changed files with 1 additions and 1 deletions

View File

@ -1152,7 +1152,7 @@ def WriteABOTAPackageWithBrilloScript(target_file, output_file,
if source_file is not None: if source_file is not None:
cmd.extend(["--source_image", source_file]) cmd.extend(["--source_image", source_file])
if OPTIONS.downgrade: if OPTIONS.downgrade:
max_timestamp = GetBuildProp("ro.build.date.utc", OPTIONS.source_info_dict) max_timestamp = source_info.GetBuildProp("ro.build.date.utc")
else: else:
max_timestamp = metadata["post-timestamp"] max_timestamp = metadata["post-timestamp"]
cmd.extend(["--max_timestamp", max_timestamp]) cmd.extend(["--max_timestamp", max_timestamp])