From: Hans-Christoph Steiner Date: Wed, 7 Jan 2015 18:56:55 +0000 (+0100) Subject: uncompress using `jar xf` in a folder with the same name X-Git-Tag: 0.4.0~142^2~4 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=74a785a888b497ff10edd519d7d92def439331c3;p=fdroidserver.git 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. --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index a7b380fb..c8ed3756 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1886,14 +1886,15 @@ def compare_apks(apk1, apk2, tmp_dir): if os.path.exists(d): shutil.rmtree(d) os.mkdir(d) + os.mkdir(os.path.join(d, 'jar-xf')) if subprocess.call(['jar', 'xf', os.path.abspath(apk1)], - cwd=apk1dir) != 0: + cwd=os.path.join(apk1dir, 'jar-xf')) != 0: return("Failed to unpack " + apk1) if subprocess.call(['jar', 'xf', os.path.abspath(apk2)], - cwd=apk2dir) != 0: + cwd=os.path.join(apk2dir, 'jar-xf')) != 0: return("Failed to unpack " + apk2) p = FDroidPopen(['diff', '-r', apk1dir, apk2dir], output=False)