On Wed, 08 Oct 2008 12:44:35 -0400, James Antill wrote:
[race in mash+createrepo]
This should fix it:
http://koji.fedoraproject.org/koji/taskinfo?taskID=868762
...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 csumo.write(checksum) csumo.close()
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.