Check for vintf compatiblity early in generation process
Currently CheckVintfIfTrebleEnabled is called after generating payload. Users have to wait for ~1 hour before vintf is checked. Do the check early and fail early. Test: th Change-Id: I2e4a8c7eaa62c94c92973c127b1d825a26e63b35
This commit is contained in:
@@ -1116,6 +1116,8 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None):
|
|||||||
target_info.info_dict['ab_partitions'] = zfp.read(
|
target_info.info_dict['ab_partitions'] = zfp.read(
|
||||||
AB_PARTITIONS).decode().strip().split("\n")
|
AB_PARTITIONS).decode().strip().split("\n")
|
||||||
|
|
||||||
|
CheckVintfIfTrebleEnabled(target_file, target_info)
|
||||||
|
|
||||||
# Metadata to comply with Android OTA package format.
|
# Metadata to comply with Android OTA package format.
|
||||||
metadata = GetPackageMetadata(target_info, source_info)
|
metadata = GetPackageMetadata(target_info, source_info)
|
||||||
# Generate payload.
|
# Generate payload.
|
||||||
@@ -1200,8 +1202,6 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None):
|
|||||||
|
|
||||||
common.ZipClose(target_zip)
|
common.ZipClose(target_zip)
|
||||||
|
|
||||||
CheckVintfIfTrebleEnabled(target_file, target_info)
|
|
||||||
|
|
||||||
# We haven't written the metadata entry yet, which will be handled in
|
# We haven't written the metadata entry yet, which will be handled in
|
||||||
# FinalizeMetadata().
|
# FinalizeMetadata().
|
||||||
common.ZipClose(output_zip)
|
common.ZipClose(output_zip)
|
||||||
|
Reference in New Issue
Block a user