This is a woefully underoptimized implementation of detecting filename
collisions between packages, so it's hidden behind the command line option
'--collisions' to enable it.

A good implementation probably (i) collects the filenames at the same time
as checksumming the archive, or has them attached to it somehow by the
packaging process, and (ii) uses a libsolv string pool to hold the filenames
(so we only need to compute the intersection and unions of sets of integers,
which is hopefully much faster)

Nevertheless, this labouriously identifies some obvious collisions which I
might bring to the attention of package maintainers when I have some time to
do so...

Jon Turney (2):
  Add underlying() method to io_stream class
  Detect filename collisions between packages

 compress.h       |  13 +++
 compress_bz.cc   |   2 -
 compress_bz.h    |   2 -
 compress_gz.h    |   2 -
 compress_xz.cc   |   2 -
 compress_xz.h    |   2 -
 compress_zstd.cc |   2 -
 compress_zstd.h  |   2 -
 filemanifest.h   |  29 ++++++
 install.cc       | 254 +++++++++++++++++++++++++++++++++++++++--------
 io_stream.h      |  31 ++----
 res/en/res.rc    |   3 +
 resource.h       |   3 +
 13 files changed, 266 insertions(+), 81 deletions(-)
 create mode 100644 filemanifest.h

-- 
2.39.0

Reply via email to