Re: adding different compression types to createrepo

Anders F Björklund <[email protected]> Tue, 3 Aug 2010 22:09:49 +0200
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
James Antill wrote:

>> openSUSE actually uses LZMA, not XZ. Both for RPMS and for repodata.
>>
>> Using liblzma would handle both, but feeding xz to lzma doesn't work.
>
>  Does that matter? The rpm payload is inside rpm, so matters less, and
> can't be changed now anyway. But for "normal" files the convention  
> is to
> use .xz now ... no?

I thought the "convention" was .gz, since that's the only choice given.

The name suffix isn't that important, whether "_xz" or "_lzma" or "2"

>>>  *shrug*, I'm not sure why we'd want to add support for lzma on the
>>> obsolete .xml files. Smart and apt both support .sqlite now, and if
>>> zypper doesn't they can always use modifyrepo to add them for SuSE.
>>
>> Smart supposes .sqlite, but it is slower to parse and not  
>> extendible ?
>
>  I find it _really_ hard to believe that XML parsing is faster than
> reading data from .sqlite.

Sloppy coding, most likely. The files *are* somewhat bigger, though...

Either way it's not as much of a gain as for yum which can use the
.sqlite files directly. Both the .xml and .sqlite need converting,
into the internal format. And so far changing hasn't been worth it.
BTW; The code is at https://code.launchpad.net/~afb/smart/sqlite

The main advantage is the random access, where even indexed XML sucks.

>  .sqlite is about as extensible as XML, and primary/etc. have never
> changed (and the coming changes are just as likely to be done by  
> adding
> new files).

It's easier to add new attributes and tags, than new columns and tables.

>  However there is a cost to having 4-8 different versions of
> primary/filelists/etc. ... both in createrepo time, in hosting disk
> space, in maintenance of all the weird code paths and in repomd.xml  
> size
> (most repos. aren't using metalink, so repomd.xml is downloaded a  
> lot).

I'm not sure where this 4-8 number came from. We were talking about 2,
or 3 if you want to include the .sqlite files too (which are different).

repomd.xml
primary.xml.gz (or primary.xml)
primary.xml.xz (or primary.xml.lzma)
primary.sqlite.bz2

When primary.xml.gz is removed, that's only one or two formats left.
Depending on whether you are using the XML markup or SQL database ?

Just thought it was a simple solution to the repodata compatibility.
And something that you would have upstream rather that downstream...

--anders