[diffoscope] 01/01: Only look at files with ending in .deb when looking for Build IDs

Jérémy Bobbio lunar at moszumanska.debian.org
Tue Feb 16 15:30:17 CET 2016


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

lunar pushed a commit to branch master
in repository diffoscope.

commit 68ab8ad3635b5e522e97f266bd508858ab61120d
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Tue Feb 16 15:27:20 2016 +0100

    Only look at files with ending in .deb when looking for Build IDs
    
    This should further improve the situation when parent directories
    of compared files also contain many other files.
---
 diffoscope/comparators/deb.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/diffoscope/comparators/deb.py b/diffoscope/comparators/deb.py
index 6cb659f..1045474 100644
--- a/diffoscope/comparators/deb.py
+++ b/diffoscope/comparators/deb.py
@@ -37,7 +37,11 @@ from diffoscope.comparators.tar import TarContainer
 # given container
 def get_build_id_map(container):
     d = {}
-    for member in container.get_members().values():
+    for member_name, member in container.get_members().items():
+        # Let's assume the name will end with .deb to avoid looking at
+        # too many irrelevant files
+        if not member_name.endswith('.deb'):
+            continue
         diffoscope.comparators.specialize(member)
         if isinstance(member, DebFile) and member.control:
             build_ids = member.control.get('Build-Ids', None)

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


More information about the diffoscope mailing list