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

Commit 2da41b24 authored by Luca Stefani's avatar Luca Stefani Committed by Nolen Johnson
Browse files

fixup! Correct logic for obtaining the path to full recovery image

* The original change had the right idea BUT it removed
  the extra vendor from the "root path" instead of the
  "target" path.

* This broke non-vendor building devices who did not
  set BOARD_USES_FULL_RECOVERY_IMAGE.

* This wasn't noticed for so long on 21 as, well, almost
  no one on 21 doesn't build vendor image AND doesn't
  set the full recovery image flag.

* This restores the expected behavior where all components
  are installed to (device relative) `/vendor`.

Change-Id: Id706d90f54c4a87676b58fd11d76236bffa183f0
parent ff096414
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -3875,12 +3875,8 @@ def MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img,
  board_uses_vendorimage = info_dict.get("board_uses_vendorimage") == "true"
  board_builds_vendorimage =  info_dict.get("board_builds_vendorimage") == "true"

  if board_builds_vendorimage:
    # In this case, the output sink is rooted at VENDOR
  if board_builds_vendorimage or not board_uses_vendorimage:
    recovery_img_path = "etc/recovery.img"
  elif not board_uses_vendorimage:
    # In this case the output sink is rooted at SYSTEM
    recovery_img_path = "vendor/etc/recovery.img"
  else:
    logger.warning('Recovery patch generation is disable when prebuilt vendor image is used.')
    return None
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ def main(argv):
  if board_builds_vendorimage:
    target_files_dir = "VENDOR"
  elif not board_uses_vendorimage:
    target_files_dir = "SYSTEM"
    target_files_dir = "SYSTEM/vendor"

  def output_sink(fn, data):
    if target_files_dir is None: