* Alberto Donato <alberto.don...@canonical.com> [161205 17:51]:
> I get the following error:
>
> $ reprepro --bunzip2 NONE update precise-security
> Error reading from
> ./lists/update-precise-security_precise-security_main_amd64_Packages.bz2:
> Trailing garbage after compressed data!
> There have been errors!
>
> Lists are downloaded correctly but they don't get decompressed. After that,
> even running with the external decompressor fails:

This looks like the Packages.bz2 file was created by concatenating two
.bz2 files, the later being empty. This is either  not supported by
libbz2 directly (and would need some workaround in reprepro), or there
is a bug in libbz2.

BZ2_bzDecompress return BZ_STREAM_END.
In bz2.next_in is another header ("BZh9\027rE8P\220\000\000\000"),
bz2.avail_in is 13. (I.e. directly at the end of the current buffer
reprepro feeds into libbz2 is another BZ2 block/stream, which might
not be complete).

The actual end of the Packages.bz2 file is
000a2170: d8 9d b0 42 5a 68 39 17 72 45 38 50 90 00 00 00 ...BZh9.rE8P....
000a2180: 00                                              .

i.e. the file has one more byte than the 16k bytes block buffer
reprepro uses to feed the data into libbz2.

        Bernhard R. Link
-- 
F8AC 04D5 0B9B 064B 3383  C3DA AFFC 96D1 151D FFDC

Reply via email to