ports/sysutils/py-diffoscope/files/patch-diffoscope_comparators_deb.py
Kubilay Kocak f7da613142 [NEW] sysutils/py-diffoscope: In-depth comparison of files, archives, and directories
diffoscope will try to get to the bottom of what makes files or
directories different. It will recursively unpack archives of many kinds
and transform various binary formats into more human readable form to
compare them. It can compare two tarballs, ISO images, or PDF just as
easily.

It can be scripted through error codes, and a report can be produced
with the detected differences. The report can be text or HTML. When no
type of report has been selected, diffoscope defaults to write a text
report on the standard output.

diffoscope is developed as part of the 'reproducible builds' Deian
project. It is meant to be able to quickly understand why two builds
of the same package produce different outputs. diffoscope was previously
named debbindiff.

WWW: https://diffoscope.org/

Thank you to bapt for providing the background context, information and
the getfacl patch to get this port going.

Requested by:	emaste, bapt (for reproducible builds & FOSDEM talk)
2016-01-31 08:38:33 +00:00

37 lines
1.4 KiB
Python

commit 8df464ebf0db8b04d0baae6a14504f3796e355a0
Author: Jeremy Bobbio <lunar@debian.org>
Date: Sat Jan 30 13:47:47 2016 +0000
Also use libarchive to read metadata from ar archives
The output is more precise and less dependent on binutils version.
The command line `ar` tool is not used any more so remove it from the
required tools.
--- diffoscope/comparators/deb.py.orig 2016-01-31 06:31:13 UTC
+++ diffoscope/comparators/deb.py
@@ -29,7 +29,7 @@ import diffoscope.comparators
from diffoscope.comparators.binary import File
from diffoscope.comparators.libarchive import LibarchiveContainer, list_libarchive
from diffoscope.comparators.utils import \
- Archive, ArchiveMember, get_ar_content
+ Archive, ArchiveMember
from diffoscope.comparators.tar import TarContainer
@@ -86,10 +86,9 @@ class DebFile(File):
return self._control
def compare_details(self, other, source=None):
- my_content = get_ar_content(self.path)
- other_content = get_ar_content(other.path)
- return [Difference.from_text(my_content, other_content, self.path, other.path, source="metadata")]
-
+ return [Difference.from_text_readers(list_libarchive(self.path),
+ list_libarchive(other.path),
+ self.path, other.path, source="file list")]
class Md5sumsFile(File):
@staticmethod