[Git][reproducible-builds/diffoscope][master] Don't require apksigner in order to compare .apk files using apktool.

Chris Lamb (@lamby) gitlab at salsa.debian.org
Mon Aug 9 09:09:14 UTC 2021



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
38ec13ec by Chris Lamb at 2021-08-09T10:01:16+01:00
Don't require apksigner in order to compare .apk files using apktool.

- - - - -


1 changed file:

- diffoscope/comparators/apk.py


Changes:

=====================================
diffoscope/comparators/apk.py
=====================================
@@ -24,6 +24,7 @@ import itertools
 import subprocess
 
 from diffoscope.difference import Difference
+from diffoscope.exc import RequiredToolNotFound
 from diffoscope.tools import tool_required, find_executable
 from diffoscope.tempfiles import get_temporary_directory
 
@@ -218,9 +219,13 @@ class ApkFile(ZipFileBase):
     def compare_details(self, other, source=None):
         differences = zipinfo_differences(self, other)
 
-        x = Difference.from_operation(Apksigner, self.path, other.path)
-        if x is not None:
-            differences.insert(0, x)
+        try:
+            x = Difference.from_operation(Apksigner, self.path, other.path)
+            if x is not None:
+                differences.insert(0, x)
+        except RequiredToolNotFound:  # noqa
+            # Don't require apksigner
+            pass
 
         return differences
 



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/38ec13ecc5f69a0a7f28af931e348517817d78a6

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/38ec13ecc5f69a0a7f28af931e348517817d78a6
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20210809/f72adef0/attachment.htm>


More information about the rb-commits mailing list