summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Runge <mrunge@google.com>2014-09-18 15:12:45 -0700
committerMichael Runge <mrunge@google.com>2014-09-18 15:12:45 -0700
commit560569a617c86be7985bd699e20fd19c6b2715c8 (patch)
tree164ab5e6a60372f76b1432563e37aa32d5b92453
parentd036711427ff7ecbf603b51e04c75986504138d9 (diff)
downloadbuild-560569a617c86be7985bd699e20fd19c6b2715c8.zip
build-560569a617c86be7985bd699e20fd19c6b2715c8.tar.gz
build-560569a617c86be7985bd699e20fd19c6b2715c8.tar.bz2
If oem_fingerprint_props is empty, ignore.
There may be cases where there is an OEM partition but it has no effect on the OTA itself. In these cases, ignore an empty value from the misc_info.txt Change-Id: I5f467e873030765af12810a07ddd5f302ca8cc0b
-rwxr-xr-xtools/releasetools/ota_from_target_files8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index 6f34450..e8dff5a 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -379,7 +379,7 @@ def SignOutput(temp_zip_name, output_zip_name):
def AppendAssertions(script, info_dict, oem_dict = None):
oem_props = info_dict.get("oem_fingerprint_properties")
- if oem_props is None:
+ if oem_props is None or len(oem_props) == 0:
device = GetBuildProp("ro.product.device", info_dict)
script.AssertDevice(device)
else:
@@ -463,7 +463,7 @@ def WriteFullOTAPackage(input_zip, output_zip):
oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
oem_dict = None
- if oem_props is not None:
+ if oem_props is not None and len(oem_props) > 0:
if OPTIONS.oem_source is None:
raise common.ExternalError("OEM source required for this build")
script.Mount("/oem")
@@ -746,7 +746,7 @@ def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_zip):
oem_props = OPTIONS.target_info_dict.get("oem_fingerprint_properties")
oem_dict = None
- if oem_props is not None:
+ if oem_props is not None and len(oem_props) > 0:
if OPTIONS.oem_source is None:
raise common.ExternalError("OEM source required for this build")
script.Mount("/oem")
@@ -1036,7 +1036,7 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip):
oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
oem_dict = None
- if oem_props is not None:
+ if oem_props is not None and len(oem_props) > 0:
if OPTIONS.oem_source is None:
raise common.ExternalError("OEM source required for this build")
script.Mount("/oem")