Respect framework partition set while merging meta files

The framework_partition_set would be generated from
framework_item_list and we should respect this partition
set while merging META/ab_partitions.txt.

This is to handle the case when we use a complete merged
target files package as the framework-target-files, where
its ab_partitions.txt may have non-framework partitions.
So we need to filter them out to prevent from the merged
meta file has some partitions that don't exist.

Test: merge_target_files &&
        add_img_to_target_files &&
	img_from_target_files &&
	flash device
Bug: 300193612
Change-Id: I0a76d706a20dcaffa2533278db7383563f03ec02
This commit is contained in:
Dennis Song
2023-09-13 06:53:00 +00:00
parent 91646be0a5
commit 36ce326f95
2 changed files with 17 additions and 7 deletions

View File

@@ -209,7 +209,9 @@ def create_merged_package(temp_dir):
# After this function completes successfully, all the files we need to create
# the output target files package are in place.
merge_meta.MergeMetaFiles(
temp_dir=temp_dir, merged_dir=output_target_files_temp_dir)
temp_dir=temp_dir,
merged_dir=output_target_files_temp_dir,
framework_partitions=OPTIONS.framework_partition_set)
merge_dexopt.MergeDexopt(
temp_dir=temp_dir, output_target_files_dir=output_target_files_temp_dir)