mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
uncompress using jar xf in a folder with the same name
This makes it easier to compare the whole APK folders when there are multiple methods of uncompressing the APK.
This commit is contained in:
parent
b53746dc7b
commit
74a785a888
1 changed files with 3 additions and 2 deletions
|
|
@ -1886,14 +1886,15 @@ def compare_apks(apk1, apk2, tmp_dir):
|
||||||
if os.path.exists(d):
|
if os.path.exists(d):
|
||||||
shutil.rmtree(d)
|
shutil.rmtree(d)
|
||||||
os.mkdir(d)
|
os.mkdir(d)
|
||||||
|
os.mkdir(os.path.join(d, 'jar-xf'))
|
||||||
|
|
||||||
if subprocess.call(['jar', 'xf',
|
if subprocess.call(['jar', 'xf',
|
||||||
os.path.abspath(apk1)],
|
os.path.abspath(apk1)],
|
||||||
cwd=apk1dir) != 0:
|
cwd=os.path.join(apk1dir, 'jar-xf')) != 0:
|
||||||
return("Failed to unpack " + apk1)
|
return("Failed to unpack " + apk1)
|
||||||
if subprocess.call(['jar', 'xf',
|
if subprocess.call(['jar', 'xf',
|
||||||
os.path.abspath(apk2)],
|
os.path.abspath(apk2)],
|
||||||
cwd=apk2dir) != 0:
|
cwd=os.path.join(apk2dir, 'jar-xf')) != 0:
|
||||||
return("Failed to unpack " + apk2)
|
return("Failed to unpack " + apk2)
|
||||||
|
|
||||||
p = FDroidPopen(['diff', '-r', apk1dir, apk2dir], output=False)
|
p = FDroidPopen(['diff', '-r', apk1dir, apk2dir], output=False)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue