Merge "Fix the signing error on no-system-image targets" am: 790214a4c9 am: ba922579b1 am: 2a00929dec am: 50bf9c8a11

Original change: https://android-review.googlesource.com/c/platform/build/+/1936199

Change-Id: Ie9d4557587a1df9267d1a00ee97d4f46ec8d3ac2
This commit is contained in:
Treehugger Robot
2022-01-06 07:37:07 +00:00
committed by Automerger Merge Worker

View File

@@ -520,9 +520,14 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info,
compressed_extension):
# maxsize measures the maximum filename length, including the ones to be
# skipped.
maxsize = max(
[len(os.path.basename(i.filename)) for i in input_tf_zip.infolist()
if GetApkFileInfo(i.filename, compressed_extension, [])[0]])
try:
maxsize = max(
[len(os.path.basename(i.filename)) for i in input_tf_zip.infolist()
if GetApkFileInfo(i.filename, compressed_extension, [])[0]])
except ValueError:
# Sets this to zero for targets without APK files, e.g., gki_arm64.
maxsize = 0
system_root_image = misc_info.get("system_root_image") == "true"
for info in input_tf_zip.infolist():