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

Commit ce867a65 authored by Po Hu's avatar Po Hu
Browse files

Remove APEX from merged target-files package

It was a temp folder created for check_target_files_vintf.py.
But now it is wrongly archived by create_target_files_archive
in merge_target_files.py.
And then such package will cause CheckVintf exception in
ota_from_target_files.py because the APEX folder is created
again but already exists.
So use MakeTempDir to make it removed after check finished.

Test: merge_target_files & ota_from_target_files
Change-Id: Iab54afff2c346a582d5ee5228103fe091e016cd0
parent 53084d3f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -218,12 +218,12 @@ def PrepareApexDirectory(inp, dirmap):
  2. invoke apexd_host with vendor APEXes.
  """

  apex_dir = os.path.join(inp, 'APEX')
  apex_dir = common.MakeTempDir('APEX')
  # checkvintf needs /apex dirmap
  dirmap['/apex'] = apex_dir

  # Always create /apex directory for dirmap
  os.makedirs(apex_dir)
  os.makedirs(apex_dir, exist_ok=True)

  # Invoke apexd_host to activate vendor APEXes for checkvintf
  apex_host = os.path.join(OPTIONS.search_path, 'bin', 'apexd_host')