Merge "Adds optional --rebuild_recovery flag to merge_target_files."

This commit is contained in:
Daniel Norman
2019-03-19 21:32:28 +00:00
committed by Gerrit Code Review
2 changed files with 25 additions and 11 deletions

View File

@@ -146,11 +146,12 @@ def AddSystem(output_zip, recovery_img=None, boot_img=None):
ofile.write(data)
ofile.close()
arc_name = "SYSTEM/" + fn
if arc_name in output_zip.namelist():
OPTIONS.replace_updated_files_list.append(arc_name)
else:
common.ZipWrite(output_zip, ofile.name, arc_name)
if output_zip:
arc_name = "SYSTEM/" + fn
if arc_name in output_zip.namelist():
OPTIONS.replace_updated_files_list.append(arc_name)
else:
common.ZipWrite(output_zip, ofile.name, arc_name)
if OPTIONS.rebuild_recovery:
logger.info("Building new recovery patch")