Adding a lock file to plague server Repo.py _update_repo()

Michael Schwendt bugs.michael at gmx.net
Wed May 17 10:00:56 UTC 2006


Currently, when we sign and push built packages, we move them out of a
"repodir" while the build server may be copying new packages to that
directory.

We have not cleaned up repodir for a long time either, because it could
not be done automatically without risk. The corresponding section in the
push script contains a "todo" comment only. [Recently I've used a separate
script, however, which cleans up the directory after a push, provided that
the build system is idle and no package is about to be copied into the
directory at the same time.]

I've looked at Repo.py _update_repo() where I see nothing which prevents
concurrent access to this repodir. Is there anything I'm missing when
thinking that it is possible to add a simple lock file at the root of
repodir in order to control access to this directory?  The build master
would lock the file when copying new packages to it. And the push script
would lock the file when moving packages and when cleaning up. Both would
sleep when they cannot acquire the lock.




More information about the buildsys mailing list