Bug#912756: diffoscope: Test failures with upcoming upstream file(1) version 5.35

Daniel Shahaf danielsh at apache.org
Sat Nov 3 17:06:08 GMT 2018


Control: tags -1 patch

Christoph Biedl wrote on Sat, Nov 03, 2018 at 16:13:58 +0100:
> -diffoscope-104/tests/data/test2.pcap: tcpdump capture file (little-endian) - version 2.4 (Ethernet, capture length 262144)
> +diffoscope-104/tests/data/test2.pcap: pcap capture file, microsecond ts (little-endian) - version 2.4 (Ethernet, capture length 262144)

Untested patch:

diff -ru diffoscope-104/diffoscope/comparators/pcap.py diffoscope-104.new/diffoscope/comparators/pcap.py
--- diffoscope-104/diffoscope/comparators/pcap.py	2018-10-15 10:09:05.000000000 +0000
+++ diffoscope-104.new/diffoscope/comparators/pcap.py	2018-11-03 17:04:03.749507655 +0000
@@ -40,7 +40,9 @@
 
 class PcapFile(File):
     DESCRIPTION = "tcpdump capture files (.pcap)"
-    FILE_TYPE_RE = re.compile(r'^tcpdump capture file\b')
+    # The regexp covers both libmagic<5.35 and libmagic>=5.35.
+    # See https://bugs.debian.org/912756
+    FILE_TYPE_RE = re.compile(r'^(tcpdump|pcap) capture file\b')
 
     def compare_details(self, other, source=None):
         return [Difference.from_command(

Cheers,

Daniel



More information about the Reproducible-builds mailing list