rawhide report: 20081006 changes
mschwendt at gmail.com
Wed Oct 8 18:31:30 UTC 2008
On Wed, 08 Oct 2008 12:44:35 -0400, James Antill wrote:
[race in mash+createrepo]
> This should fix it:
> ...the patch being basically:
> - csumo = open(csumfile, 'w')
> + # This is atomic cache creation via. rename, so we can have two
> + # tasks using the same cachedir ... mash does this.
> + csumo = tempfile.NamedTemporaryFile(mode='w', dir=self.crp_cachedir
> + os.rename(csumo.name, csumfile)
> ...it'll get upstream as soon as I can push :).
Looks good. It's the most you can do in createrepo without adding locks.
A small penalty remains, because the same checksum may be generated more
than once in a race-condition. Neglectable IMO.
More information about the devel