[Git][reproducible-builds/diffoscope][master] Add a helpful contextual message to the output if comparing Debian .orig...

Chris Lamb (@lamby) gitlab at salsa.debian.org
Mon Sep 23 21:35:45 UTC 2024



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
e748a477 by Chris Lamb at 2024-09-23T14:33:40-07:00
Add a helpful contextual message to the output if comparing Debian .orig tarballs within .dsc files without the ability to "fuzzy-match" away the leading directory. (Closes: reproducible-builds/diffoscope#386)

- - - - -


1 changed file:

- diffoscope/comparators/debian.py


Changes:

=====================================
diffoscope/comparators/debian.py
=====================================
@@ -32,8 +32,10 @@ except:
 from diffoscope.changes import Changes
 from diffoscope.changes import ChangesFileException
 from diffoscope.difference import Difference
+from diffoscope.tools import get_comment_for_missing_python_module
 
 from .utils.file import File
+from .utils.fuzzy import tlsh
 from .utils.container import Container
 
 logger = logging.getLogger(__name__)
@@ -43,6 +45,13 @@ class DebControlMember(File):
     def __init__(self, container, member_name):
         super().__init__(container)
         self._name = member_name
+        if tlsh is None and ".orig." in member_name:
+            self.add_comment(
+                "Fuzzy matching not enabled; file listings of of .orig "
+                "tarballs may be overly verbose. {}".format(
+                    get_comment_for_missing_python_module("tlsh")
+                )
+            )
         self._path = None
 
     @property



View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/e748a4775c50554518951a2842167423858ca1b8

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/e748a4775c50554518951a2842167423858ca1b8
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20240923/38852fad/attachment.htm>


More information about the rb-commits mailing list