Fix boot fail due to missing /apex in images

Do not move or rename any files in merge_target_files.py's temporary directory. They will be used to generate images further.

Bug: 254760332
Change-Id: I973a49b29234d49f5254a1403a0e236e69425d74
Test: check SYSTEM/apex in target-files.zip generated by merget_target_files.py
This commit is contained in:
Po Hu
2022-10-26 02:33:03 +00:00
parent f1e9574f97
commit 4d2f64b6f0

View File

@@ -280,8 +280,8 @@ def PrepareApexDirectory(inp):
inp_partition = os.path.join(inp, target_files_rel_path,"apex")
if os.path.exists(inp_partition):
apex_dir = root_dir + os.path.join(device_path + "/apex");
os.makedirs(apex_dir)
os.rename(inp_partition, apex_dir)
os.makedirs(root_dir + device_path)
shutil.copytree(inp_partition, apex_dir, symlinks=True)
ExtractApexes(apex_dir, extracted_root)
create_info_file = True