[Distutils] [Bug] Zip: Compressed size is set to a non-zero value when uncompressed size is set to zero
Alan Haggai Alavi
alanhaggai at alanhaggai.org
Mon Oct 17 19:50:00 CEST 2011
Hello,
.ZIP archive generation using setuptools seems to generate an invalid
archive. The attached archive was created with setuptools:
python setup.py sdist --format=zip
Analysing the hexdump and Zip-Parser's (https://github.com/alanhaggai/
Zip-Parser) output (attached file: zip_parser.out) it seems that the
archive is corrupt. In its local file header and central directory
file header for Foo-0.2.0/bar/__init__.py, compressed size is set to 2
(the compressed data being 0x03 and 0x00). Uncompressed size is set to
0! This has been confirmed using Ark (KDE archiving tool) and a
snapshot has been attached.
More details can be read at the bug reported against Archive::Zip Perl
module - https://rt.cpan.org/Public/Bug/Display.html?id=68446
When zipfile was used to create the archive (that is, without using
setuptools) this faulty behavior was not noticed.
Please let me know if there is anyway that I can help.
Attachment files:
- http://alanhaggai.org/files/Foo-0.2.0.zip
- http://alanhaggai.org/files/ark.png
- http://alanhaggai.org/files/zip_parser.out
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
More information about the Distutils-SIG
mailing list