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

Commit 4fdba55d 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 8ad73752
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -3054,13 +3054,10 @@ 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
  recovery_img_path = "etc/recovery.img"
  if board_builds_vendorimage:
    recovery_resource_dat_path = "VENDOR/etc/recovery-resource.dat"
  elif not board_uses_vendorimage:
    # In this case the output sink is rooted at SYSTEM
    recovery_img_path = "vendor/etc/recovery.img"
    recovery_resource_dat_path = "SYSTEM/vendor/etc/recovery-resource.dat"
  else:
    logger.warning('Recovery patch generation is disable when prebuilt vendor image is used.')
+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: