Tags: patch

>From 954297ac66735f9fa8788f22afd63b84d9df35f7 Mon Sep 17 00:00:00 2001
From: Yasushi SHOJI <ya...@atmark-techno.com>
Date: Thu, 30 Apr 2015 16:33:17 +0900
Subject: [PATCH] Disable 'Device' section diff in stat output

While using debbindiff with file system images mounted with different
loop devices, stat shows that those loop devices are indeed
different. This clutters the report if you are comparing many files and
unable to see important points.

Usually those devices does not matter when comparing files for
reproducible build, so disable the device diff.
 debbindiff/comparators/directory.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debbindiff/comparators/directory.py 
index d296b22..aeece5a 100644
--- a/debbindiff/comparators/directory.py
+++ b/debbindiff/comparators/directory.py
@@ -36,10 +36,12 @@ class Stat(Command):
         return ['stat', self.path]
     FILE_RE = re.compile(r'^\s*File:.*$')
+    DEVICE_RE = re.compile(r'Device: [0-9a-f]+h/[0-9]+d')
     INODE_RE = re.compile(r'Inode: [0-9]+')
     def filter(self, line):
         line = Stat.FILE_RE.sub('', line)
+        line = Stat.DEVICE_RE.sub('', line)
         line = Stat.INODE_RE.sub('', line)
         return line

Reproducible-builds mailing list

Reply via email to