[Rpm-ecosystem] Some points about zchunk

Jonathan Dieter jdieter at gmail.com
Wed Jul 11 11:23:47 UTC 2018


On Wed, 2018-07-11 at 11:08 +0000, Michael Schroeder wrote:
> On Wed, Jul 11, 2018 at 11:20:00AM +0100, Jonathan Dieter wrote:
> > 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?
> 
> But it's not librepo that calls libsolv, it's libdnf.

Ah, ok.  For some reason, I had it in my mind that librepo was calling
libsolv directly, but, after looking through the code, you're right. 
It seems that both libdnf and dnf just pass the path from librepo
straight to libsolv and assume that libsolv will be able to open it.

> Anyway, this discussion started because you said:
> 
> > I had originally planned to do something along these lines (I think I
> > used primary-zck rather than primary at zchunk), but realized that this
> > pushed the "choose best format" code into the top-level tools, rather
> > than leaving the decision in librepo.
> 
> So you're kind of contradicting yourself, IMHO.
> 
> Basically all libdnf does is call:
>   path = lr_yum_repo_path(yum_repo, "primary");
> and then:
>   fp_primary = solv_xfopen(hy_repo_get_string(hrepo, path);
>   repo_add_rpmmd(repo, fp_primary, 0, 0);
> 
> I don't see why librepo can't automagically download/return the
> "primary at zchunk" entry instead of "primary".

That's something I didn't think of, and you're absolutely right.

So, to summarize, we'll leave the gzip entry as "primary", so legacy
systems will still download without any problems, and create a new
"primary at zchunk" that librepo will automagically download if zchunk is
supported?

Jonathan


More information about the Rpm-ecosystem mailing list