[Rpm-metadata] createrepo: external locking?

Oliver Hookins oliver.hookins at nokia.com
Wed Aug 25 12:56:20 UTC 2010


Hi all,

I've hit an interesting problem on some of our repositories we use for
populating with our own applications. We have build servers generating RPMs
automatically (sometimes on every scm commit) and these are then dumped into the
yum repository directories and createrepo run on the directory to generate the
metadata.

At the moment, this means that every job in the build system that generates RPMs
must have its own directory (and now there are quite a few) as multiple
createrepo instances running against the same directory fails. We can't just run
it from cron periodically as there are some triggered jobs which pull down the
most recent metadata immediately afterwards to do some testing of the new
packages.

So, is there some way to get createrepo to lock a particular directory so that
multiple processes can update the metadata at least sequentially? Or is this
kind of thing best done with a wrapper around createrepo (or not at all)?

Best Regards,
Oliver


More information about the Rpm-metadata mailing list