Creating repodata for Mandriva

Anders F Björklund afb at algonet.se
Fri Aug 19 01:59:42 PDT 2011


Since createrepo-0.9 is increasingly hard to modify,
requires yum, and not any accepting patches upstream -
I backported some of the fixes to createrepo-0.4.11,
or actually the "maintenance" branch of the git repo:

http://createrepo.baseurl.org/git/createrepo.git
http://afb.users.sourceforge.net/repodata/patches/

It adds the required "distepoch" support, and brings
back some of the newer options like sha256 and lzma/xz.
The default is to stay compatible, by offering *both*
gzip and lzma rather than switching to using xz (only).

Here is a comparison from Mandriva Cooker, created with:
createrepo -p --lzma --changelog-limit=10 media/main/release

4,0K	media/main/release/media_info/MD5SUM
 48M	media/main/release/media_info/hdlist.cz
844K	media/main/release/media_info/synthesis.hdlist.cz
456K	media/main/release/media_info/info.xml.lzma
4,0M	media/main/release/media_info/files.xml.lzma
2,0M	media/main/release/media_info/changelog.xml.lzma

4,0K	media/main/release/repodata/repomd.xml
2,1M	media/main/release/repodata/primary.xml.gz
1,5M	media/main/release/repodata/primary.xml.lzma
6,1M	media/main/release/repodata/filelists.xml.gz
4,6M	media/main/release/repodata/filelists.xml.lzma
1,4M	media/main/release/repodata/other.xml.gz
716K	media/main/release/repodata/other.xml.lzma


You can use this with yum, and it will create .sqlite files
locally from .xml.gz (using the yum-metadata-parser module),
or you can use it with smart and it will prefer the smaller
.xml.lzma files for download but the actual XML is the same.

The repodata format does not allow distepochs in <version>,
but disttag and distepoch are available under the <format>:
    <rpm:disttag>mdv</rpm:disttag>
    <rpm:distepoch>2011.0</rpm:distepoch>

--anders




More information about the Smart mailing list