Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 0706addf authored by dhacker29's avatar dhacker29 Committed by Michael Bestas
Browse files

Fix ro.build.product not found by ota_from_target_files in some cases

After I5dccba2172dade3dacc55d832a2042fce306b5f5 it was possible that
if override_prop was set and override_device was not set the script
was looking for a prop that did not exist.

Change-Id: I444a33de5bcb59f129bdcf631c2a6540c5926545
parent 84f3c867
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1992,6 +1992,9 @@ endif

ifneq ($(TARGET_UNIFIED_DEVICE),)
    $(INTERNAL_OTA_PACKAGE_TARGET): override_prop := --override_prop=true
    ifeq ($(TARGET_OTA_ASSERT_DEVICE),)
        $(INTERNAL_OTA_PACKAGE_TARGET): override_device := $(TARGET_DEVICE)
    endif
endif

$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE)
+11 −9
Original line number Diff line number Diff line
@@ -456,9 +456,6 @@ def AppendAssertions(script, info_dict, oem_dict=None):
  oem_props = info_dict.get("oem_fingerprint_properties")
  if oem_props is None or len(oem_props) == 0:
    if OPTIONS.override_device == "auto":
      if OPTIONS.override_prop:
        device = GetBuildProp("ro.build.product", info_dict)
      else:
      device = GetBuildProp("ro.product.device", info_dict)
    else:
      device = OPTIONS.override_device
@@ -1522,6 +1519,11 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip):
    oem_dict = common.LoadDictionaryFromLines(
        open(OPTIONS.oem_source).readlines())

  if OPTIONS.override_prop:
    metadata = {
        "ota-type": "FILE",
    }
  else:
    metadata = {
        "pre-device": GetOemProperty("ro.product.device", oem_props, oem_dict,
                                     OPTIONS.source_info_dict),