public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-apps@cygwin.com
Subject: Re: [PATCH setup 0/2] Detect filename collisions between packages
Date: Mon, 24 Apr 2023 18:46:16 +0200	[thread overview]
Message-ID: <ZEayWPZ7eE701/KE@calimero.vinschen.de> (raw)
In-Reply-To: <20230423144330.3107-1-jon.turney@dronecode.org.uk>

Hi Jon,

On Apr 23 15:43, Jon Turney via Cygwin-apps wrote:
> 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...

Theoretically, wouldn't this be better handled in the upload process, i.
e. by calm, rather than during the download process?

Calm could create a database containing all the files from the tar
archives it uploads, and compare that against the newly uploaded files
on the fly.  So it could just refuse to upload packages with files
already present in another package.  I don't think such a database would
take too much space on sware.  This may be much less time consuming and
it would prevent the collisions before they even occur.

There's probably another problem in terms of different file lists in
different package versions, though...


Corinna

  parent reply	other threads:[~2023-04-24 16:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23 14:43 Jon Turney
2023-04-23 14:43 ` [PATCH setup 1/2] Add underlying() method to io_stream class Jon Turney
2023-04-23 14:43 ` [PATCH setup 2/2] Detect filename collisions between packages Jon Turney
2023-04-24 16:26   ` Christian Franke
2023-04-27 16:11     ` Jon Turney
2023-04-27 17:20       ` Christian Franke
2023-04-24 16:46 ` Corinna Vinschen [this message]
2023-04-24 18:16   ` [PATCH setup 0/2] " Achim Gratz
2023-04-27 16:11     ` Jon Turney
2023-04-28  5:51       ` Brian Inglis
2023-04-30 18:25         ` Jon Turney
2023-05-04  4:14           ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZEayWPZ7eE701/KE@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).