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

Commit 7b53ae67 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Only enable zucchini if configuration file exists"

parents 83b8158d 3db1ef61
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1208,6 +1208,8 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None):
        metadata.postcondition.partition_state)

  if not ota_utils.IsZucchiniCompatible(source_file, target_file):
    logger.warning(
        "Builds doesn't support zucchini, or source/target don't have compatible zucchini versions. Disabling zucchini.")
    OPTIONS.enable_zucchini = False

  additional_args += ["--enable_zucchini",
+4 −3
Original line number Diff line number Diff line
@@ -697,6 +697,7 @@ def IsZucchiniCompatible(source_file: str, target_file: str):
      if os.path.exists(entry_path):
        with open(entry_path, "r") as fp:
          return fp.read()
      else:
        return ""
  return ReadEntry(source_file, _ZUCCHINI_CONFIG_ENTRY_NAME) == ReadEntry(target_file, _ZUCCHINI_CONFIG_ENTRY_NAME)
    return False
  sourceEntry = ReadEntry(source_file, _ZUCCHINI_CONFIG_ENTRY_NAME)
  targetEntry = ReadEntry(target_file, _ZUCCHINI_CONFIG_ENTRY_NAME)
  return sourceEntry and targetEntry and sourceEntry == targetEntry