[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#600852: Fail to read empty but gzipped Packages files



On Thu, Oct 21, 2010 at 07:07, Christian PERRIER <bubulle@debian.org> wrote:
> From the changelog, there are chances that this:
>
>  * apt-pkg/contrib/fileutl.cc:
>    - Fix FileFd::Size() for gzipped files to give the size of the
>      uncompressed data.
>
> ...is involved in the regression.

Exactly right.

The fix for #595691 in 0.8.2 assumes that FileFd::Size() returns the size of
the file (what the comment says) and not the size of the content in the file
-- these are equal for uncompressed files so no big deal, but that changed
for compressed files with this change…

In theory that should have been caught by the testcase for #595691 -
the testcase was just broken enough to hide it…
(and confused me therefore quite a bit).

I searched a bit for other Size() invocations which should be changed to
FileSize() now but found none so far. Hopefully that is really the only one.
Patch attached and Michael already bugged. :)


Best regards

David Kalnischkies

Attachment: apt-bug-600852-empty-gzipped-files
Description: Binary data


Reply to: