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

Commit fccafb15 authored by Tom Marshall's avatar Tom Marshall Committed by Rashed Abdel-Tawab
Browse files

build: ota: Support for install tools in /tmp/install

 * Anything in OUT/install gets packaged up into the zip and extracted
   to /tmp/install immediately after FullOTA_InstallBegin.

 * Use /tmp/install in edify scripts and remove code related to using
   and manipulating /system for install tools.

Change-Id: I315a3238e36c8d15e26f935e272f7e27dd59c320
parent 1534b5c9
Loading
Loading
Loading
Loading
+15 −0
Original line number Original line Diff line number Diff line
@@ -376,6 +376,16 @@ def AddCompatibilityArchive(target_zip, output_zip, system_included=True,
                    compress_type=zipfile.ZIP_STORED)
                    compress_type=zipfile.ZIP_STORED)




def CopyInstallTools(output_zip):
  oldcwd = os.getcwd()
  os.chdir(os.getenv('OUT'))
  for root, subdirs, files in os.walk("install"):
    for f in files:
      p = os.path.join(root, f)
      output_zip.write(p, p)
  os.chdir(oldcwd)


def WriteFullOTAPackage(input_zip, output_zip):
def WriteFullOTAPackage(input_zip, output_zip):
  # TODO: how to determine this?  We don't know what version it will
  # TODO: how to determine this?  We don't know what version it will
  # be installed on top of. For now, we expect the API just won't
  # be installed on top of. For now, we expect the API just won't
@@ -471,6 +481,11 @@ else if get_stage("%(bcb_dev)s") == "3/3" then
  script.AppendExtra("ifelse(is_mounted(\"/system\"), unmount(\"/system\"));")
  script.AppendExtra("ifelse(is_mounted(\"/system\"), unmount(\"/system\"));")
  device_specific.FullOTA_InstallBegin()
  device_specific.FullOTA_InstallBegin()


  CopyInstallTools(output_zip)
  script.UnpackPackageDir("install", "/tmp/install")
  script.SetPermissionsRecursive("/tmp/install", 0, 0, 0755, 0644, None, None)
  script.SetPermissionsRecursive("/tmp/install/bin", 0, 0, 0755, 0755, None, None)

  system_progress = 0.75
  system_progress = 0.75


  if OPTIONS.wipe_user_data:
  if OPTIONS.wipe_user_data: