[Yum-devel] Implementing delta metadata

Zdenek Pavlas zpavlas at redhat.com
Mon Sep 26 12:36:06 UTC 2011


> I conducted a few tests, and found that the diff size is much less in
> general when i perform the diff between xml files, than in case of
> sqlite files.
> 
> Also, what is the advantage of using sqlite instead of xml (since I
> could not find this anywhere in the wiki)?

XML compresses and diffs better, but yum needs random access
to packages when resolving dependencies.  Yum currently downloads
platform-neutral .sqlite files built on the server.  It's slightly
bigger download, but still faster than building the DB locally.

> I have used the bsdiff utility to create binary diffs, and it is
> giving nice small deltas. bspatch can be used to patch it back. So
> rsync won't be really necessary.

That's an option.  But It's 1:1 diff, so either you'd need to generate
many diffs on each update, or implement 'chaining' patches on the client.

> What do you think?

I like the idea to diff on XML metadata.  It's already sorted on package
name so it should diff really well.

But yum depends on .sqlite files, and I'm afraid 'createrepo' cannot
be used to build e.g. 'primary.sqlite' from 'primary.xml', it needs
a directory full of RPM files (I might be wrong, just browsed the
sources and it looks so).

So, we'd need to patch createrepo, or implement the xml => sqlite
metadata filter in yum.  Should be quite easy, as the contents are 
almost the same.

--
Zdenek


More information about the Yum-devel mailing list