author | TreeHugger Robot <treehugger-gerrit@google.com> | 2018-12-09 00:42:23 (GMT) |
---|---|---|
committer | Android Partner Code Review <android-gerrit-partner@google.com> | 2018-12-09 00:42:23 (GMT) |
commit | f2f1ebdad59793b2ec4e8fc32d66c771e4d078ac (patch) | |
tree | d5acb769ddebb80032d0fa1c51fa068a73507636 | |
parent | b701f9d22bc9669aa335778c309a3b92e0a0aef5 (diff) | |
parent | b77fb0186e43c756f6e3c5eb79809d4016899a5a (diff) | |
download | common-f2f1ebdad59793b2ec4e8fc32d66c771e4d078ac.zip common-f2f1ebdad59793b2ec4e8fc32d66c771e4d078ac.tar.gz common-f2f1ebdad59793b2ec4e8fc32d66c771e4d078ac.tar.bz2 |
Merge "ota_amlogic: fix compile error [1/1]" into p-tv-dev
-rwxr-xr-x | ota_amlogic.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/ota_amlogic.py b/ota_amlogic.py index e71047f..94ac5e5 100755 --- a/ota_amlogic.py +++ b/ota_amlogic.py @@ -249,12 +249,14 @@ class BuildInfo(object): def __init__(self, info_dict, oem_dicts): """Initializes a BuildInfo instance with the given dicts. + Note that it only wraps up the given dicts, without making copies. + Arguments: info_dict: The build-time info dict. oem_dicts: A list of OEM dicts (which is parsed from --oem_settings). Note that it always uses the first dict to calculate the fingerprint or the device name. The rest would be used for asserting OEM properties only - (e.g. one package can be installed on one of these devices). + (e.g. one package can be installed on one of these devices). """ self.info_dict = info_dict self.oem_dicts = oem_dicts @@ -288,9 +290,15 @@ class BuildInfo(object): def __getitem__(self, key): return self.info_dict[key] + def __setitem__(self, key, value): + self.info_dict[key] = value + def get(self, key, default=None): return self.info_dict.get(key, default) + def items(self): + return self.info_dict.items() + def GetBuildProp(self, prop): """Returns the inquired build property.""" try: @@ -859,14 +867,9 @@ else if get_stage("%(bcb_dev)s") == "3/3" then script.ShowProgress(0.05, 5) script.WriteRawImage("/boot", "boot.img") - ZipOtherImage("bootloader", OPTIONS.input_tmp, output_zip) - script.ShowProgress(0.2, 10) device_specific.FullOTA_InstallEnd() - script.AppendExtra('ui_print("update bootloader.img...");') - script.AppendExtra('write_bootloader_image(package_extract_file("bootloader.img"));') - if OPTIONS.extra_script is not None: script.AppendExtra(OPTIONS.extra_script) @@ -876,6 +879,10 @@ else if get_stage("%(bcb_dev)s") == "3/3" then script.ShowProgress(0.1, 10) script.FormatPartition("/data") + script.FormatPartition("/data") + script.FormatPartition("/metadata") + script.AppendExtra('wipe_cache();') + if OPTIONS.two_step: script.AppendExtra(""" set_stage("%(bcb_dev)s", ""); |