Package: buildd Version: 0.60.0-2 Severity: normal Tags: patch The following happens to people which have to upload quite a lot on a slow uplink: - buildd-uploader is invoked, starts the upload process and creats a lock named buildd-uploader.lock - a second buildd-uploader instance is invoked. It notices the lock, doesn't do a thing except it kills the lock due to the following END statement: |if (defined($conf) && | defined($uploader) && | defined($uploader->get('Uploader Lock')));
'Uploader Lock' is defined at this point but it is 0 because this instance does not own the lock - a third instance of buildd-uploader is invoked which will upload packages. The patch attached fixes the issue. Sebastian
>From d515d550155874612266bf459c5fd4051e863721 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bige...@linutronix.de> Date: Wed, 4 Aug 2010 10:35:21 +0200 Subject: [PATCH] buildd-uploader: don't kill the lock if not the owner The following happens to people which have to upload quite a lot on a slow uplink: - buildd-uploader is invoked, starts the upload process and creats a lock named buildd-uploader.lock - a second buildd-uploader instance is invoked. It notices the lock, doesn't do a thing except it kills the lock due to the following END statement: |if (defined($conf) && | defined($uploader) && | defined($uploader->get('Uploader Lock'))); 'Uploader Lock' is defined at this point but it is 0 because this instance does not own the lock - a third instance of buildd-uploader is invoked which will upload packages. Signed-off-by: Sebastian Andrzej Siewior <bige...@linutronix.de> --- bin/buildd-uploader | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/bin/buildd-uploader b/bin/buildd-uploader index 6f70754..c5dc2da 100755 --- a/bin/buildd-uploader +++ b/bin/buildd-uploader @@ -46,5 +46,6 @@ END { unlock_file($conf->get('HOME') . "/buildd-uploader") if (defined($conf) && defined($uploader) && - defined($uploader->get('Uploader Lock'))); + defined($uploader->get('Uploader Lock')) && + $uploader->get('Uploader Lock')); } -- 1.7.1