Loading diffoscope/comparators/fsimage.py +4 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import os.path from diffoscope.difference import Difference from diffoscope.tools import python_module_missing from diffoscope.profiling import profile from diffoscope.tools import get_package_provider from .utils.file import File from .utils.archive import Archive Loading Loading @@ -128,7 +129,9 @@ class FsImageFile(File): ) ) if not guestfs: pkg = get_package_provider("guestfs") infix = f" from the '{pkg}' package " if pkg else " " self.add_comment( "Installing the 'guestfs' package may produce a better output." f"Installing the 'guestfs' Python module{infix}may produce a better output." ) return differences diffoscope/comparators/pdf.py +4 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import logging import os import re from diffoscope.tools import python_module_missing, tool_required from diffoscope.tools import python_module_missing, tool_required, get_package_provider from diffoscope.difference import Difference from .utils.file import File Loading Loading @@ -64,8 +64,10 @@ class PdfFile(File): xs = [] if PyPDF2 is None: pkg = get_package_provider("pypdf2") infix = f" from the '{pkg}' package " if pkg else " " self.add_comment( "Installing the 'PyPDF2' package may produce a better output." f"Installing the 'PyPDF2' Python module{infix}may produce a better output." ) else: difference = Difference.from_text( Loading diffoscope/exc.py +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class RequiredToolNotFound(Exception): x = get_package_provider(self.operation) if x: xs.append( "Installing the '{}' package may produce a better output.".format( "Installing the '{}' package may produce better output.".format( x ) ) Loading diffoscope/external_tools.py +2 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ EXTERNAL_TOOLS = { "FreeBSD": "gnupg", "guix": "gnupg", }, "guestfs": {"debian": "python3-guestfs"}, "gzip": {"debian": "gzip", "arch": "gzip", "guix": "gzip"}, "h5dump": {"debian": "hdf5-tools", "arch": "hdf5", "guix": "hdf5"}, "html2text": {"debian": "html2text"}, Loading Loading @@ -183,6 +184,7 @@ EXTERNAL_TOOLS = { "FreeBSD": "ghostscript9-base", "guix": "ghostscript", }, "pypdf2": {"debian": "python3-pypdf2"}, "radare2": {"debian": "radare2", "arch": "radare2", "guix": "radare2"}, "readelf": { "debian": "binutils-multiarch", Loading Loading
diffoscope/comparators/fsimage.py +4 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import os.path from diffoscope.difference import Difference from diffoscope.tools import python_module_missing from diffoscope.profiling import profile from diffoscope.tools import get_package_provider from .utils.file import File from .utils.archive import Archive Loading Loading @@ -128,7 +129,9 @@ class FsImageFile(File): ) ) if not guestfs: pkg = get_package_provider("guestfs") infix = f" from the '{pkg}' package " if pkg else " " self.add_comment( "Installing the 'guestfs' package may produce a better output." f"Installing the 'guestfs' Python module{infix}may produce a better output." ) return differences
diffoscope/comparators/pdf.py +4 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import logging import os import re from diffoscope.tools import python_module_missing, tool_required from diffoscope.tools import python_module_missing, tool_required, get_package_provider from diffoscope.difference import Difference from .utils.file import File Loading Loading @@ -64,8 +64,10 @@ class PdfFile(File): xs = [] if PyPDF2 is None: pkg = get_package_provider("pypdf2") infix = f" from the '{pkg}' package " if pkg else " " self.add_comment( "Installing the 'PyPDF2' package may produce a better output." f"Installing the 'PyPDF2' Python module{infix}may produce a better output." ) else: difference = Difference.from_text( Loading
diffoscope/exc.py +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ class RequiredToolNotFound(Exception): x = get_package_provider(self.operation) if x: xs.append( "Installing the '{}' package may produce a better output.".format( "Installing the '{}' package may produce better output.".format( x ) ) Loading
diffoscope/external_tools.py +2 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ EXTERNAL_TOOLS = { "FreeBSD": "gnupg", "guix": "gnupg", }, "guestfs": {"debian": "python3-guestfs"}, "gzip": {"debian": "gzip", "arch": "gzip", "guix": "gzip"}, "h5dump": {"debian": "hdf5-tools", "arch": "hdf5", "guix": "hdf5"}, "html2text": {"debian": "html2text"}, Loading Loading @@ -183,6 +184,7 @@ EXTERNAL_TOOLS = { "FreeBSD": "ghostscript9-base", "guix": "ghostscript", }, "pypdf2": {"debian": "python3-pypdf2"}, "radare2": {"debian": "radare2", "arch": "radare2", "guix": "radare2"}, "readelf": { "debian": "binutils-multiarch", Loading