]> err.no Git - dak/commitdiff
processnew.lock is no longer required
authorLuca Falavigna <dktrkranz@debian.org>
Sun, 7 Apr 2013 20:08:06 +0000 (20:08 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Sun, 7 Apr 2013 20:08:06 +0000 (20:08 +0000)
config/debian/cron.dinstall
config/debian/cron.unchecked
config/debian/dak.conf
config/debian/dinstall.functions
config/debian/dinstall.variables
dak/process_new.py

index a626c93a6b71443f9816247b9cd9eaebfb488969..58f397b4654f3f1f719f669b3b7bda32ebbe3bc5 100755 (executable)
@@ -207,7 +207,6 @@ GO=(
 stage $GO
 
 lockfile "$LOCK_ACCEPTED"
-lockfile "$LOCK_NEW"
 trap remove_all_locks EXIT TERM HUP INT QUIT
 
 GO=(
index fb5c454ac22cd95bf3a68db45f4f0bd2f8c4fcaf..7db5c284574697dcfcd3883fce5a8310cb31a87d 100755 (executable)
@@ -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"
 
index 8208458028252a1dad116ed5ddcedf5bc22dc014..85ff4a39aa5f7da45a416d2a27f16b28ca713978 100644 (file)
@@ -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/";
 };
 
index 1ced76028b703c107b19ed6a4028705ef3ca598a..8119387c5483da7daccf17c1edf04b948196e0e4 100644 (file)
@@ -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
index 47222a5d4654c0a82cfe53edc2c7449fc6d4ecb2..81a651d8f807823f595e16545fd07e1fb4558474 100644 (file)
@@ -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
index 7352b91d16d7efb6332d60870eccea679903cdb6..e3dc5de13e735a35b479335a60841cf18256db97 100755 (executable)
@@ -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):
     """