[diffoscope] 02/05: Zipinfo included in APK files comparison. (Closes: #850502)

Chris Lamb chris at chris-lamb.co.uk
Mon Jan 9 12:32:17 CET 2017


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit 9749aa9f90552940ed6c4e318581c63458e3e437
Author: Maria Glukhova <siamezzze at gmail.com>
Date:   Mon Jan 9 06:30:42 2017 +0300

    Zipinfo included in APK files comparison. (Closes: #850502)
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 diffoscope/comparators/apk.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/diffoscope/comparators/apk.py b/diffoscope/comparators/apk.py
index 636cfff..38fd3bc 100644
--- a/diffoscope/comparators/apk.py
+++ b/diffoscope/comparators/apk.py
@@ -24,9 +24,11 @@ import subprocess
 
 from diffoscope.tools import tool_required
 from diffoscope.tempfiles import get_temporary_directory
+from diffoscope.difference import Difference
 
 from .utils.file import File
 from .utils.archive import Archive
+from .zip import Zipinfo, ZipinfoVerbose
 
 logger = logging.getLogger(__name__)
 
@@ -93,3 +95,8 @@ class ApkFile(File):
     def recognizes(file):
         return ApkFile.RE_FILE_TYPE.match(file.magic_file_type) and \
             ApkFile.RE_FILE_EXTENSION.search(file.name)
+
+    def compare_details(self, other, source=None):
+        zipinfo_difference = Difference.from_command(Zipinfo, self.path, other.path) or \
+                             Difference.from_command(ZipinfoVerbose, self.path, other.path)
+        return [zipinfo_difference]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list