diff options
author | Eric Bélanger <snowmaniscool@gmail.com> | 2010-03-02 04:44:08 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-03-03 21:02:15 +0100 |
commit | 17dd60ced8eb8ca461b73dd8429be0fda83264e5 (patch) | |
tree | 6622d1d2e10e7b2368b0c43c2c096942331da8df /config | |
parent | 18a74ca61a44a6716f6e3a160cc32efc6cc6cbab (diff) | |
download | dbscripts-17dd60ced8eb8ca461b73dd8429be0fda83264e5.tar.gz dbscripts-17dd60ced8eb8ca461b73dd8429be0fda83264e5.tar.xz |
Make repo locking an atomic process and added timeout argument
The repo locking function now use a lock directory instead of a lock
file. This makes the lock checking and creation an atomic process.
The repo_lock function will now try to obtain a lock every $LOCK_DELAY
seconds until it is successful. An optional third argument can be use
to give a timeout in seconds; this is intended for scripts that runs
unattended. Repo locking is now used in the ftpdir-cleanup script.
This should fix the problem of the ftpdir-cleanup script removing the
new package instead of the old one (FS#17058).
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Diffstat (limited to 'config')
-rw-r--r-- | config | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -8,6 +8,9 @@ CLEANUP_DESTDIR="/srv/package-cleanup" CLEANUP_DRYRUN=false SOURCE_CLEANUP_DESTDIR="/srv/source-cleanup" +LOCK_DELAY=10 +LOCK_TIMEOUT=300 + STAGING="$HOME/staging" TMPDIR="/srv/tmp" ARCHES=(i686 x86_64) |