Hi Mateo, > For some weird reason this works when extracting but not when listing > archive content:
There is a considerable difference between the two operations. When listing an archive, tar attempts to seek in it, in order to skip file content, something it doesn't do when extracting. If lseek returns -1, the archive is marked as non-seekable and further skipping is done by reading and discarding contents (that's normally what happens when reading archive from stdin). However, if lseek returns a positive value, that value must be divisible by record size. You'll get this diagnostics if it is not: > tar: rmtlseek not stopped at a record boundary I tried both operations on an arbitrarily selected deb file, and didn't encounter any problems. However, I was using git HEAD (I haven't had the time to inspect your patches yet, sorry). Can something in your changess cause such behavior? FWIW, the main question is actually: why lseek succeeded when reading from stdin? Regards, Sergey