On Sun, Mar 06, 2011 at 08:50:30AM +0100, Raphael Hertzog wrote:
> On Sat, 05 Mar 2011, Josh Triplett wrote:
> > dpkg-deb --fsys-tarfile /dev/stdin seems to work, but it would help to
> > have some guarantee in the documentation that it will always work, and
> > dpkg-deb will never seek on the input.
> 
> Help for what? What's your use case?

In my particular case, writing a program that imports the data of a .deb
into a git repository, and wanting to stream the .deb (which I don't
necessarily have as a file) into dpkg-deb without using a temporary
file.

> I don't really see the advantage that we get to commit to such a
> restriction. (--fsys-tarfile is mainly used by dpkg itself)
> 
> OTOH, we just pass the incoming stream to a decompressor like gzip/xz
> and I doubt they will do any seek. And parsing the few bits of ar
> information is unlikely to change.

I assumed that the decompressor would handle streaming, as would the ar
implementation.  I guess I just wanted to know that dpkg-deb will
continue to read the contents of the ar archive in order.  It already
needs to read the debian-binary member first, and --fsys-tarfile
shouldn't need to read the control.tar.gz at all, so it seems reasonable
and not particularly restrictive to guarantee that dpkg-deb
--fsys-tarfile will read the ar archive in order.

- Josh Triplett




-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to