On Sun, Apr 24, 2016 at 12:57:46PM +0200, Marc Espie wrote:
> On Sun, Apr 24, 2016 at 01:47:24AM -0400, dan mclaughlin wrote:
> > the sizes of the compressed/uncompressed data are wrong. i have tested gzip
> > and 'tar zcf' and the values are right, but using pkg_create fails.
> 
> gzip -l will just give you the first chunk, that's a limitation of the gzip
> tool itself.

I've had a slightly closer look at gzip...

making gzip -l able to recognize multiple chunks archive should be doable,
but it would require a lot of code churn.

More precisely, the gz_read code has a check that we arrived at the end,
it tries to read a new header, and it keeps going if it can.

So this would require seeking on the input file, trying to read a new header
and displaying it.

I'm pretty sure it's not worth it.


if you need looking at chunked tarballs further, there's some code in
regress/usr.sbin/pkg_add/extract_chunks that does precisely that: look
at the actual boundaries, and uncompress each chunk separately.

Reply via email to