We're operating under the assumption that if two files have the same
cryptographic checksum, then their contents are exactly the same, so it
doesn't matter that they're stored at the same pathname.  (There's an
inefficiency right now that the file will be overwritten, but we'll
eventually get rid of that.)

Now, if there are real concerns about collisions, then short of alleviating
those concerns by moving to a new hash algorithm, we'll have to individually
compare each byte of a file with a given hash with the one already on the
system.  That can get expensive, particularly since we already have to read
through the entire file to get its hash in the first place, and then again
since from one version of a package to another, most files will end up with
the same hash, meaning that we'll end up doing a lot of collision detection
on files that are actually identical.

It's probably worth quantifying that cost at some point, but it's a low
priority at the moment.

Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to