Re: createrepo: external locking?
Oliver Hookins <[email protected]> Thu, 26 Aug 2010 11:50:49 +0200
| Newsgroups | gmane.linux.rpm.metadata |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Aug 25, 2010 at 05:06:49PM +0200, ext seth vidal wrote: > > That's pretty much it. We did all of the builds initially dropping their RPMs > > into a single repository and had frequent collisions between createrepo runs. > > Then it sounds to me like you need a proper build system with dependent > build relationships. Something like koji. Thanks for the suggestion, I wasn't aware of koji so I'll take a look at it. > > A few of other options: > > 1. have each process generate their repodata in another outputdir and > then copy the repodata over top of the path you want atomically. > > you still run the risk of there being races there, however. > > 2. have a repo per-builder and use yum to merge the repos at > install/build time. Then each builder has their own repo they are > controlling uniquely. > > Then when the builds are finished one process can merge all of those. > > 3. put a wrapper with a simple lockfile around createrepo so the other > processes wait until it is complete before they start. > > I don't see putting this code into createrepo - if only b/c it is a bit > out of scope for createrepo, I think. It may be a problem not worth solving, or maybe even a non-problem. Thank you very much for your suggestions.