[Rpm-ecosystem] Some points about zchunk

Jonathan Dieter jdieter at gmail.com
Wed Jul 11 10:20:00 UTC 2018


On Wed, 2018-07-11 at 08:28 +0000, Michael Schroeder wrote:
> On Tue, Jul 10, 2018 at 02:05:26PM +0100, Jonathan Dieter wrote:
> > The top-level tool only needs to deal with the uncompressed metadata. 
> > dnf/libdnf requests the primary metadata from librepo, which downloads
> > the zchunk version, passes it to libsolv which decompresses it and
> > creates the .solv file usable by the top-level tools.
> 
> Yes, so the selection of the flavor to download should be in dnf/libdnf.

I must be missing something because I don't understand how that
follows.  As I understand it, dnf requests the primary metadata. 
Librepo then downloads either primary.xml.gz or primary.xml.zck. 
Librepo then asks libsolv to decompress the xml file and convert it
into a solv file.  dnf then uses the solv file directly.  Why should
dnf care whether librepo downloaded primary.xml.gz or primary.xml.zck?

> > DNF neither knows, nor cares that librepo downloaded the zchunk metadata
> > rather than gz.
> 
> That's just because libsolv uses the file suffix to autodetect the
> compression.
> Actually dnf/libdnf sould ask libsolv if it supports the compression
> (by calling solv_xfopen_iscompressed()) and not blindly assume that
> it will magically work.

Agreed, but I think it should be librepo asking libsolv if it supports
the compression.

Jonathan


More information about the Rpm-ecosystem mailing list