From bd2efade5bfe477a21a68f25f3a305f562ae539d Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 15 May 2009 00:38:58 +0200 Subject: [PATCH] p-n look process-new with an own lockfile. This wont make a difference for dinstall, same lock time there. But it will make a big difference whenever cron.unchecked runs (which is far more often), as it now will lock for a few seconds and not for the sometimes unbearable long times process-unchecked and the w-b trigger needs. Signed-off-by: Joerg Jaspert --- config/debian/cron.dinstall | 7 ++++++- config/debian/cron.unchecked | 3 +++ config/debian/dak.conf | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index edd6f6c6..1ecbca74 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -520,9 +520,12 @@ NOTICE="$ftpdir/Archive_Maintenance_In_Progress" # lock cron.unchecked (it immediately exits when this exists) LOCK_DAILY="$lockdir/daily.lock" -# Lock process-new and cron.unchecked from doing work +# 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 @@ -603,6 +606,7 @@ GO=( stage $GO lockfile "$LOCK_ACCEPTED" +lockfile "$LOCK_NEW" GO=( FUNC="process_unchecked" @@ -638,6 +642,7 @@ GO=( stage $GO rm -f "$LOCK_ACCEPTED" +rm -f "$LOCK_NEW" GO=( FUNC="msfl" diff --git a/config/debian/cron.unchecked b/config/debian/cron.unchecked index cf9cd6e1..e18f8635 100755 --- a/config/debian/cron.unchecked +++ b/config/debian/cron.unchecked @@ -27,6 +27,7 @@ export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars LOCKDAILY="" LOCKFILE="$lockdir/unchecked.lock" +LOCK_NEW="$lockdir/processnew.lock" NOTICE="$lockdir/daily.lock" if [ -e $NOTICE ]; then @@ -71,7 +72,9 @@ function do_buildd () { # the actual unchecked functions follow # ######################################################################## +lockfile "$LOCK_NEW" acceptnew +rm -f "$LOCK_NEW" # only run one cron.unchecked lockfile -r3 $LOCKFILE || exit 0 diff --git a/config/debian/dak.conf b/config/debian/dak.conf index ee12e769..7860e88c 100644 --- a/config/debian/dak.conf +++ b/config/debian/dak.conf @@ -173,7 +173,7 @@ Clean-Suites Process-New { - DinstallLockFile "/srv/ftp.debian.org/lock/unchecked.lock"; + DinstallLockFile "/srv/ftp.debian.org/lock/processnew.lock"; LockDir "/srv/ftp.debian.org/lock/new/"; }; -- 2.39.2