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

Commit 5516d37f authored by Tao Bao's avatar Tao Bao
Browse files

Revert "releasetools: check_target_files_signatures.py checks APEXes."

This reverts commit d8469727. The script
is broken on target_files.zip that don't contain any APEX.

Bug: 128848294
Test: Run check_target_files_signatures.py on target_files.zip w/o APEX.
parent e3f9dc61
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -168,7 +168,6 @@ def CertFromPKCS7(data, filename):


class APK(object):

  def __init__(self, full_filename, filename):
    self.filename = filename
    self.certs = None
@@ -245,12 +244,12 @@ class TargetFiles(object):
    # must decompress them individually before we perform any analysis.

    # This is the list of wildcards of files we extract from |filename|.
    apk_extensions = ['*.apk', '*.apex']
    apk_extensions = ['*.apk']

    self.certmap, compressed_extension = common.ReadApkCerts(
        zipfile.ZipFile(filename))
        zipfile.ZipFile(filename, "r"))
    if compressed_extension:
      apk_extensions.append('*.apk' + compressed_extension)
      apk_extensions.append("*.apk" + compressed_extension)

    d = common.UnzipTemp(filename, apk_extensions)
    self.apks = {}
@@ -273,7 +272,7 @@ class TargetFiles(object):
          os.remove(os.path.join(dirpath, fn))
          fn = uncompressed_fn

        if fn.endswith(('.apk', '.apex')):
        if fn.endswith(".apk"):
          fullname = os.path.join(dirpath, fn)
          displayname = fullname[len(d)+1:]
          apk = APK(fullname, displayname)