Created
July 14, 2016 20:41
-
-
Save satyamz/af269bd8f3ba442dc27eb2a574ec7607 to your computer and use it in GitHub Desktop.
This is sample implementation (Not verified yet) .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/diffoscope/comparators/debian.py b/diffoscope/comparators/debian.py | |
index 9c12f3d..9f4bfae 100644 | |
--- a/diffoscope/comparators/debian.py | |
+++ b/diffoscope/comparators/debian.py | |
@@ -147,6 +147,17 @@ class DotChangesFile(DebControlFile): | |
file._deb822 = changes | |
return True | |
+ def compare(self, other, source=None): | |
+ try: | |
+ differences = self.compare_details(other, source) | |
+ combine_file_list = [(x, y) for x, y in zip(self.deb822.get('Files'), other.deb822.get('Files'))] | |
+ L = [f for f in enumerate(combine_file_list) if f[0]['md5sum'] != f[1]['md5sum'] and f[0]['name'].endswith('.buildinfo')] | |
+ if not all(filter(None, differences[:-1])) and not L: | |
+ return None | |
+ else: | |
+ return super(DotChangesFile, self).compare(other, source) | |
+ except TypeError: | |
+ return super(DotChangesFile, self).compare(other, source) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment