[diffoscope] 02/02: RPM files are .cpio but let's always leave it to the RPM comparator.

Chris Lamb chris at chris-lamb.co.uk
Sat Sep 9 20:58:09 CEST 2017


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

lamby pushed a commit to branch master
in repository diffoscope.

commit 6ea2f3caa2b08d652208dc68759218581f8d073a
Author: Chris Lamb <lamby at debian.org>
Date:   Sat Sep 9 19:55:42 2017 +0100

    RPM files are .cpio but let's always leave it to the RPM comparator.
---
 diffoscope/comparators/binwalk.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/diffoscope/comparators/binwalk.py b/diffoscope/comparators/binwalk.py
index dc6f665..b14cd0f 100644
--- a/diffoscope/comparators/binwalk.py
+++ b/diffoscope/comparators/binwalk.py
@@ -27,6 +27,10 @@ from diffoscope.tempfiles import get_temporary_directory
 from .utils.file import File
 from .utils.archive import Archive
 
+try:
+    from .rpm import RpmFile
+except ImportError:
+    from .rpm_fallback import RpmFile
 
 try:
     import binwalk
@@ -62,6 +66,10 @@ class BinwalkFile(File):
         if not super().recognizes(file):
             return False
 
+        # RPM files are .cpio, but let's always leave it to the RPM comparator
+        if file.container and isinstance(file.container.source, RpmFile):
+            return False
+
         # Don't recurse; binwalk has already found everything
         if isinstance(file.container, cls.CONTAINER_CLASS):
             return False

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


More information about the diffoscope mailing list