[Git][reproducible-builds/diffoscope][master] Drop removal of calculated basename from readelf output. (Closes:...

Chris Lamb (@lamby) gitlab at salsa.debian.org
Mon Sep 30 17:39:48 UTC 2024



Chris Lamb pushed to branch master at Reproducible Builds / diffoscope


Commits:
74bd931d by Chris Lamb at 2024-09-30T10:39:03-07:00
Drop removal of calculated basename from readelf output. (Closes: reproducible-builds/diffoscope#394)

I don't think readelf includes the name anymore, at least how diffoscope calls it:

         if (optind < (argc - 1))
           /* When displaying information for more than one file,
              prefix the information with the file name.  */
           show_name = true;
           ...

- - - - -


1 changed file:

- diffoscope/comparators/elf.py


Changes:

=====================================
diffoscope/comparators/elf.py
=====================================
@@ -59,10 +59,6 @@ logger = logging.getLogger(__name__)
 class Readelf(Command):
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
-        # we don't care about the name of the archive
-        self._path_re = re.compile(
-            r"\b%s/\b" % re.escape(os.path.dirname(self.path))
-        )
         self._archive_re = re.compile(r"^File: %s\(" % re.escape(self.path))
 
     @tool_required("readelf")
@@ -85,9 +81,6 @@ class Readelf(Command):
         # we don't care about the name of the archive
         val = self._archive_re.sub("File: lib.a(", val)
 
-        # the full path can appear in the output, we need to remove it
-        val = self._path_re.sub("/", val)
-
         return val.encode("utf-8")
 
     @staticmethod



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

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/-/commit/74bd931d712c67486db8ccf9d88c50086f917363
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/20240930/1d597e71/attachment.htm>


More information about the rb-commits mailing list