From 24604cc5b9bf12efc9814cfda2c176bb678d71bc Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 1 Feb 2018 16:25:44 -0800 Subject: [PATCH] releasetools: Clean up two no-op lines that set 'ota-wipe'. The same thing has been set in GetPackageMetadata(), so they are no-op. Also replace an occurrence of 'OPTIONS.source_info_dict' with source_info, which has been missed from previous clean-up CLs. Test: Generate an A/B OTA package, and an incremental BBOTA with --wipe_user_data. Check the metadata. Test: Generate a two-step incremental BBOTA successfully. Change-Id: I4bb491cac9064d93fb86d12e617c8f38f040e01e --- tools/releasetools/ota_from_target_files.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py index 95b73033c..ab6c9ad6b 100755 --- a/tools/releasetools/ota_from_target_files.py +++ b/tools/releasetools/ota_from_target_files.py @@ -919,7 +919,7 @@ def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_zip): if OPTIONS.two_step: if not source_info.get("multistage_support"): assert False, "two-step packages not supported by this build" - fs = OPTIONS.source_info_dict["fstab"]["/misc"] + fs = source_info["fstab"]["/misc"] assert fs.fs_type.upper() == "EMMC", \ "two-step packages only supported on devices with EMMC /misc partitions" bcb_dev = {"bcb_dev" : fs.device} @@ -1049,7 +1049,6 @@ else if OPTIONS.wipe_user_data: script.Print("Erasing user data...") script.FormatPartition("/data") - metadata["ota-wipe"] = "yes" if OPTIONS.two_step: script.AppendExtra(""" @@ -1200,7 +1199,6 @@ def WriteABOTAPackageWithBrilloScript(target_file, output_file, if OPTIONS.wipe_user_data: with open(properties_file, "a") as f: f.write("POWERWASH=1\n") - metadata["ota-wipe"] = "yes" # Add the signed payload file and properties into the zip. In order to # support streaming, we pack payload.bin, payload_properties.txt and