From: Luca Falavigna Date: Sun, 7 Apr 2013 20:08:06 +0000 (+0000) Subject: processnew.lock is no longer required X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=1dd3d2fb2df2af57cf3966e257a94e000235407a;p=dak.git processnew.lock is no longer required --- diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index a626c93a..58f397b4 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -207,7 +207,6 @@ GO=( stage $GO lockfile "$LOCK_ACCEPTED" -lockfile "$LOCK_NEW" trap remove_all_locks EXIT TERM HUP INT QUIT GO=( diff --git a/config/debian/cron.unchecked b/config/debian/cron.unchecked index fb5c454a..7db5c284 100755 --- a/config/debian/cron.unchecked +++ b/config/debian/cron.unchecked @@ -32,7 +32,6 @@ export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars LOCKDAILY="" LOCKFILE="$lockdir/unchecked.lock" -LOCK_NEW="$lockdir/processnew.lock" NOTICE="$lockdir/daily.lock" LOCK_BUILDD="$lockdir/buildd.lock" diff --git a/config/debian/dak.conf b/config/debian/dak.conf index 82084580..85ff4a39 100644 --- a/config/debian/dak.conf +++ b/config/debian/dak.conf @@ -117,7 +117,6 @@ Clean-Suites Process-New { - DinstallLockFile "/srv/ftp-master.debian.org/lock/processnew.lock"; LockDir "/srv/ftp-master.debian.org/lock/new/"; }; diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 1ced7602..8119387c 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -11,7 +11,7 @@ function remove_daily_lock() { # Remove all locks function remove_all_locks() { - rm -f $LOCK_DAILY $LOCK_ACCEPTED $LOCK_NEW + rm -f $LOCK_DAILY $LOCK_ACCEPTED } # If we error out this one is called, *FOLLOWED* by cleanup above diff --git a/config/debian/dinstall.variables b/config/debian/dinstall.variables index 47222a5d..81a651d8 100644 --- a/config/debian/dinstall.variables +++ b/config/debian/dinstall.variables @@ -28,9 +28,6 @@ LOCK_DAILY="$lockdir/daily.lock" # Lock cron.unchecked from doing work LOCK_ACCEPTED="$lockdir/unchecked.lock" -# Lock process-new from doing work -LOCK_NEW="$lockdir/processnew.lock" - # This file is simply used to indicate to britney whether or not # the Packages file updates completed sucessfully. It's not a lock # from our point of view diff --git a/dak/process_new.py b/dak/process_new.py index 7352b91d..e3dc5de1 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -527,17 +527,12 @@ def do_new(upload, upload_copy, handler, session): continue if answer == 'A' and not Options["Trainee"]: - try: - check_daily_lock() - add_overrides(missing, upload.target_suite, session) - if Config().find_b("Dinstall::BXANotify"): - do_bxa_notification(missing, upload, session) - handler.accept() - done = True - Logger.log(["NEW ACCEPT", upload.changes.changesname]) - except CantGetLockError: - print "Hello? Operator! Give me the number for 911!" - print "Dinstall in the locked area, cant process packages, come back later" + add_overrides(missing, upload.target_suite, session) + if Config().find_b("Dinstall::BXANotify"): + do_bxa_notification(missing, upload, session) + handler.accept() + done = True + Logger.log(["NEW ACCEPT", upload.changes.changesname]) elif answer == 'C': check_pkg(upload, upload_copy, session) elif answer == 'E' and not Options["Trainee"]: @@ -625,24 +620,6 @@ ENVIRONMENT VARIABLES ################################################################################ -def check_daily_lock(): - """ - Raises CantGetLockError if the dinstall daily.lock exists. - """ - - cnf = Config() - try: - lockfile = cnf.get("Process-New::DinstallLockFile", - os.path.join(cnf['Dir::Lock'], 'processnew.lock')) - - os.open(lockfile, - os.O_RDONLY | os.O_CREAT | os.O_EXCL) - except OSError as e: - if e.errno == errno.EEXIST or e.errno == errno.EACCES: - raise CantGetLockError - - os.unlink(lockfile) - @contextlib.contextmanager def lock_package(package): """