Handle multiple APKs from the same package in check_target_files_signatures.py.
We were using the package name as the key to index APKs. APKs from the
same package got messed up and gave wrong signature summary. Switch to
using the package filename as the key, which is identical in a given build.
Also fix the trailing space when printing the signature summary.
Bug: 30418268
Test: Run with a target_files.zip that has multiple APKs from the same package.
Change-Id: I6317e8c05e987c5690915e05c294153d10e2f0ab
(cherry picked from commit 6a54299fbd
)
This commit is contained in:
parent
a212b9c250
commit
1a75fa6493
|
@ -245,7 +245,7 @@ class TargetFiles(object):
|
|||
fullname = os.path.join(dirpath, fn)
|
||||
displayname = fullname[len(d)+1:]
|
||||
apk = APK(fullname, displayname)
|
||||
self.apks[apk.package] = apk
|
||||
self.apks[apk.filename] = apk
|
||||
self.apks_by_basename[os.path.basename(apk.filename)] = apk
|
||||
|
||||
self.max_pkg_len = max(self.max_pkg_len, len(apk.package))
|
||||
|
@ -316,8 +316,7 @@ class TargetFiles(object):
|
|||
self.max_pkg_len, apk.package,
|
||||
apk.shared_uid)
|
||||
else:
|
||||
print " %-*s %-*s" % (self.max_fn_len, apk.filename,
|
||||
self.max_pkg_len, apk.package)
|
||||
print " %-*s %s" % (self.max_fn_len, apk.filename, apk.package)
|
||||
print
|
||||
|
||||
def CompareWith(self, other):
|
||||
|
|
Loading…
Reference in New Issue