Merge "Revert "releasetools: Use pattern filter when unzipping."" am: 0c3e31c69b
am: 6c98ad6c4e
am: a4170833d1
Change-Id: I529f9eb380fc06b08d02be80635f9ac9a9317654
This commit is contained in:
commit
f9566f38e2
3 changed files with 4 additions and 8 deletions
|
@ -235,7 +235,7 @@ class TargetFiles(object):
|
|||
self.certmap = None
|
||||
|
||||
def LoadZipFile(self, filename):
|
||||
d, z = common.UnzipTemp(filename, ['*.apk'])
|
||||
d, z = common.UnzipTemp(filename, '*.apk')
|
||||
try:
|
||||
self.apks = {}
|
||||
self.apks_by_basename = {}
|
||||
|
|
|
@ -564,7 +564,7 @@ def UnzipTemp(filename, pattern=None):
|
|||
def unzip_to_dir(filename, dirname):
|
||||
cmd = ["unzip", "-o", "-q", filename, "-d", dirname]
|
||||
if pattern is not None:
|
||||
cmd.extend(pattern)
|
||||
cmd.append(pattern)
|
||||
p = Run(cmd, stdout=subprocess.PIPE)
|
||||
p.communicate()
|
||||
if p.returncode != 0:
|
||||
|
|
|
@ -184,8 +184,6 @@ OPTIONS.payload_signer = None
|
|||
OPTIONS.payload_signer_args = []
|
||||
|
||||
METADATA_NAME = 'META-INF/com/android/metadata'
|
||||
UNZIP_PATTERN = ['IMAGES/*', 'META/*', 'RADIO/*']
|
||||
|
||||
|
||||
def MostPopularKey(d, default):
|
||||
"""Given a dict, return the key corresponding to the largest
|
||||
|
@ -2216,8 +2214,7 @@ def main(argv):
|
|||
OPTIONS.extra_script = open(OPTIONS.extra_script).read()
|
||||
|
||||
print("unzipping target target-files...")
|
||||
OPTIONS.input_tmp, input_zip = common.UnzipTemp(
|
||||
args[0], UNZIP_PATTERN if OPTIONS.block_based else None)
|
||||
OPTIONS.input_tmp, input_zip = common.UnzipTemp(args[0])
|
||||
|
||||
OPTIONS.target_tmp = OPTIONS.input_tmp
|
||||
OPTIONS.info_dict = common.LoadInfoDict(input_zip, OPTIONS.target_tmp)
|
||||
|
@ -2285,8 +2282,7 @@ def main(argv):
|
|||
else:
|
||||
print("unzipping source target-files...")
|
||||
OPTIONS.source_tmp, source_zip = common.UnzipTemp(
|
||||
OPTIONS.incremental_source,
|
||||
UNZIP_PATTERN if OPTIONS.block_based else None)
|
||||
OPTIONS.incremental_source)
|
||||
OPTIONS.target_info_dict = OPTIONS.info_dict
|
||||
OPTIONS.source_info_dict = common.LoadInfoDict(source_zip,
|
||||
OPTIONS.source_tmp)
|
||||
|
|
Loading…
Reference in a new issue