Commit 22559212 authored by Chris Lamb's avatar Chris Lamb 👀
Browse files

Fix regression where we stopped using the -dbgsym packages when comparing...

Fix regression where we stopped using the -dbgsym packages when comparing .buildinfo or .changes files. (Closes: reproducible-builds/diffoscope:#44)
parent 68ecee74
Loading
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -469,7 +469,7 @@ class ElfContainer(Container):
            )
            raise OutputParsingError(command, self)

        if not has_debug_symbols and Config().use_dbgsym:
        if not has_debug_symbols:
            self._install_debug_symbols()

    @tool_required('objcopy')
@@ -485,6 +485,15 @@ class ElfContainer(Container):
        if not isinstance(deb, DebFile) or not deb.container:
            return

        # If the .deb in question is the top-level of the source we have passed
        # a .deb directly to diffoscope (versus finding one specified in a
        # .changes or .buildinfo file). In this case, don't automatically
        # search for a -dbgsym file unless the user specified
        # `Config().use_dbgsym`.
        if not hasattr(deb.container.source, 'container') and \
                not Config().use_dbgsym:
            return

        # Retrieve the Build ID for the ELF file we are examining
        build_id = get_build_id(self.source.path)
        debuglink = get_debug_link(self.source.path)