Note that the file we have in lists/ is not what we downloaded as we
have downloaded a highly compressed version of the content (e.g. xz),
but store it either uncompressed (for which we have a checksum) or
lightly compressed (e.g. lz4 for which we have no checksum and can not
as different versions of a compressor could produce different files). So
such a check is not exactly free as we need to potentially uncompress
the content we want to check – we can't even do a size check in the
general case "for free". It might be worth it paying the price in
"update", but there are a bunch of people who believe we shouldn't,
reporting bugs to the effect that a no-change update should finish
instantly.

That said, files of size 0 could be made always invalid: We don't
download such files nowadays (as an empty file compressed has a [small]
size), so files in lists/ should have at least some content and if they
don't something is absolutely fishy.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1809174

Title:
  apt doesn't detect file corruption in /var/lib/apt/lists

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1809174/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to