[diffoscope] What file to diff on after root paths are compared?
Aman Sharma
amansha at kth.se
Tue Dec 31 13:24:21 UTC 2024
Hi Chris,
Thanks for you answer and the pointers to the codebase! I agree it would not make sense to diff only specific files given there are so many ways to archive files.
Regards,
Aman Sharma
PhD Student
KTH Royal Institute of Technology
School of Electrical Engineering and Computer Science (EECS)
Department of Theoretical Computer Science (TCS)
<http://www.kth.se><https://www.kth.se/profile/amansha><https://www.kth.se/profile/amansha>
<https://www.kth.se/profile/amansha>https://algomaster99.github.io/
________________________________
From: Chris Lamb <chris at reproducible-builds.org>
Sent: Tuesday, December 31, 2024 2:00:17 PM
To: Aman Sharma
Cc: diffoscope
Subject: Re: [diffoscope] What file to diff on after root paths are compared?
Hello Aman,
> My question is how does it know which files to diff over? For
> example, consider the diff output below between two jars. It first
> runs some zip archive related tools and then shows the diff between
> the files (MANIFEST and properties file) that was actually causing
> the changes in the archive. Does diffoscope know about these files
> from zipinfo/zipnote/zipdetails output or does it simply diff over
> all files in the archive?
The latter; it diffs all files within the archive, regardless of what
zipinfo, zipnote and zipdetails might say — the output of these tools
is not parsed.
The mechanism for this is not entirely clear within diffoscope's
codebase, however, This is partly because of the ways diffoscope
itself provides an abstraction layer to support many different file
formats, but also because, for the majority of archive types, the
actual extraction process is delegated to the libarchive library.
You can see this in action within diffoscope/comparators/utils/libarchive.py,
where a call to get_member_names() calls ensure_unpacked() and thereby
extracting the archive's contents to a temporary directory.
Best wishes,
--
o
⬋ ⬊ Chris Lamb
o o reproducible-builds.org 💠
⬊ ⬋
o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/diffoscope/attachments/20241231/e9ad5918/attachment.htm>
More information about the diffoscope
mailing list