Supply apex_info.pb as parameter to delta_generator if file exists

Supply generator with parameter --apex_info_file=META/apex_info.pb
if the file exists.

This ensures that apex_info is included in payload header.

This is identical to the behaviour of brillo_update_payload
which is not being used since:
Invoke delta_generator directly
fcd731e3d6

Issue: 286253576
Test: Manual, confirm that apex_info is included in payload header
Change-Id: Ic096c5f8966beec8686f918aba462c955290a6c5
This commit is contained in:
Håkan Kvist
2023-06-09 11:59:22 +02:00
parent a85c8a863a
commit ddb968dce0

View File

@@ -846,6 +846,11 @@ class PayloadGenerator(object):
if os.path.exists(dynamic_partition_info): if os.path.exists(dynamic_partition_info):
cmd.extend(["--dynamic_partition_info_file", dynamic_partition_info]) cmd.extend(["--dynamic_partition_info_file", dynamic_partition_info])
apex_info = os.path.join(
target_dir, "META", "apex_info.pb")
if os.path.exists(apex_info):
cmd.extend(["--apex_info_file", apex_info])
major_version, minor_version = ParseUpdateEngineConfig( major_version, minor_version = ParseUpdateEngineConfig(
os.path.join(target_dir, "META", "update_engine_config.txt")) os.path.join(target_dir, "META", "update_engine_config.txt"))
if source_file: if source_file: