[PATCH] buildd-uploader: don't kill the lock if not the owner

Sebastian Andrzej Siewior bigeasy at linutronix.de
Wed Aug 4 08:35:21 UTC 2010


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 <bigeasy at 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


--HlL+5n6rz5pIUxbD--



------------=_1287948974-26090-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 591620-close) by bugs.debian.org; 24 Oct 2010 19:32:51 +0000
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on busoni.debian.org
X-Spam-Level: 
X-Spam-Bayes: score:0.0000 Tokens: new, 59; hammy, 151; neutral, 217; spammy,
	0. spammytokens: hammytokens:0.000-+--HX-Debian:DAK,
	0.000-+--H*rp:D*ftp-master.debian.org, 0.000-+--HX-DAK:process-upload,
	0.000-+--HX-DAK:dak, 0.000-+--H*r:128.148.34
X-Spam-Status: No, score=-12.3 required=4.0 tests=AWL,BAYES_00,FROMDEVELOPER,
	FVGT_m_MULTI_ODD,HAS_BUG_NUMBER,IMPRONONCABLE_1,IMPRONONCABLE_2,
	MURPHY_WRONG_WORD1,MURPHY_WRONG_WORD2,PGPSIGNATURE autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Return-path: <envelope at ftp-master.debian.org>
Received: from franck.debian.org ([128.148.34.3])
	from C=NA,ST=NA,L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP CA,CN=franck.debian.org,EMAIL=hostmaster at franck.debian.org (verified)
	by busoni.debian.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69)
	(envelope-from <envelope at ftp-master.debian.org>)
	id 1PA6JG-0006Lp-QZ
	for 591620-close at bugs.debian.org; Sun, 24 Oct 2010 19:32:50 +0000
Received: from dak by franck.debian.org with local (Exim 4.69)
	(envelope-from <envelope at ftp-master.debian.org>)
	id 1PA6JE-0001wX-Bq; Sun, 24 Oct 2010 19:32:48 +0000
From: Roger Leigh <rleigh at debian.org>
To: 591620-close at bugs.debian.org
X-DAK: dak process-upload
X-Debian: DAK
X-Debian-Package: sbuild
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Subject: Bug#591620: fixed in sbuild 0.60.1-1
Message-Id: <E1PA6JE-0001wX-Bq at franck.debian.org>
Sender: Archive Administrator <dak at franck.debian.org>
Date: Sun, 24 Oct 2010 19:32:48 +0000

Source: sbuild
Source-Version: 0.60.1-1

We believe that the bug you reported is fixed in the latest version of
sbuild, which is due to be installed in the Debian FTP archive:

buildd_0.60.1-1_all.deb
  to main/s/sbuild/buildd_0.60.1-1_all.deb
libsbuild-perl_0.60.1-1_all.deb
  to main/s/sbuild/libsbuild-perl_0.60.1-1_all.deb
sbuild_0.60.1-1.diff.gz
  to main/s/sbuild/sbuild_0.60.1-1.diff.gz
sbuild_0.60.1-1.dsc
  to main/s/sbuild/sbuild_0.60.1-1.dsc
sbuild_0.60.1-1_all.deb
  to main/s/sbuild/sbuild_0.60.1-1_all.deb
sbuild_0.60.1.orig.tar.gz
  to main/s/sbuild/sbuild_0.60.1.orig.tar.gz
wanna-build_0.60.1-1_all.deb
  to main/s/sbuild/wanna-build_0.60.1-1_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 591620 at bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Roger Leigh <rleigh at debian.org> (supplier of updated sbuild package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster at debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Format: 1.8
Date: Sun, 24 Oct 2010 19:56:34 +0100
Source: sbuild
Binary: libsbuild-perl sbuild wanna-build buildd
Architecture: source all
Version: 0.60.1-1
Distribution: unstable
Urgency: low
Maintainer: Debian buildd-tools Developers <buildd-tools-devel at lists.alioth.debian.org>
Changed-By: Roger Leigh <rleigh at debian.org>
Description: 
 buildd     - Daemon for automatically building Debian binary packages from Deb
 libsbuild-perl - Tool for building Debian binary packages from Debian sources
 sbuild     - Tool for building Debian binary packages from Debian sources
 wanna-build - Database to track building of Debian binary packages from Debian
Closes: 559533 570463 571565 571726 588818 591620
Changes: 
 sbuild (0.60.1-1) unstable; urgency=low
 .
   * New release.
   * debian/control:
     - Upgrade to Standards-Version 3.9.1.
   * sbuild:
     - Add --no-source option (Closes: #571726).  Thanks to David
       Bremner for this suggestion.
     - Hint aptitude to produce better solutions in AptitudeBuildDepSatisfier.
       Thanks to Modestas Vainius.  (Closes: #570463)
     - AptitudeBuildDepSatisfier: Handle the case when default negative dep is
       not available gracefully.  Thanks to Modestas Vainius.
       (Closes: #571565).
     - Improve support for aptitude.
     - Set DEBIAN_FRONTEND=noninteractive when using aptitude
       (Closes: #588818).
     - Improve dpkg-source v3 source format handling.  Don't hard-code
       assumptions about how the source files are named
       (Closes: #559533).
     - Remove conflict with schroot from oldstable.
   * buildd:
     - Retry the current suite if --take fails.  (Closes: #570463)
   * buildd-uploader:
     - Don't remove the uploader lock if not already the owner
       Closes: #591620).  Thanks to Sebastian Andrzej Siewior.
   * libsbuild-perl:
     - depend on schroot 1.4.0 or greater due to sbuild-createchroot
       creating schroot.conf fragments with 1.4.x-specific features.
Checksums-Sha1: 
 ae9d51e330142a39247479acbdbdb058f13b5fa9 1265 sbuild_0.60.1-1.dsc
 4538c6e1ceb6aea759deb8b51276b785f24ea7cc 494103 sbuild_0.60.1.orig.tar.gz
 a0fddd5458378c1bf3c10dd2f5c060d1347741ed 20 sbuild_0.60.1-1.diff.gz
 397dc82150fc1e79aa0722055f3d278710b44ea7 215552 libsbuild-perl_0.60.1-1_all.deb
 55e67f90c7830a502644acd5d38e16fb151c8ecf 217686 sbuild_0.60.1-1_all.deb
 81153c5d81fa62075684d8ab922e34d9a682c074 219630 wanna-build_0.60.1-1_all.deb
 a98356d404a06d96d2033f7adcc1f05bcce633be 211324 buildd_0.60.1-1_all.deb
Checksums-Sha256: 
 5cf38964c38317f71c01ae2edc9da8e0600ef12e70d4c97d1842a8f107192c45 1265 sbuild_0.60.1-1.dsc
 600cbf7bf95bf447f3cd1bcc822954ef58b791f18e9187ec8c7a7a9dc3af8dc3 494103 sbuild_0.60.1.orig.tar.gz
 f61f27bd17de546264aa58f40f3aafaac7021e0ef69c17f6b1b4cd7664a037ec 20 sbuild_0.60.1-1.diff.gz
 381153071b5ef1102dc767ca37df0819a5c261cec8aa94089e470d51b050e75e 215552 libsbuild-perl_0.60.1-1_all.deb
 33e9f6ee15c15835f5c97f2f2443aa4289d5356a9ba7bda211a8efd40a0833b2 217686 sbuild_0.60.1-1_all.deb
 fb3bcec20ec451a1cfdc59a1b2165e850cf9ea925004a90a9ebde4512ed3ef35 219630 wanna-build_0.60.1-1_all.deb
 3c00050a117042b5dbbc4e25e9df90d1fa63f1bd9cb6dfe7d3eea617006f3ef0 211324 buildd_0.60.1-1_all.deb
Files: 
 964cfca1726f14f1552997b18dc8b4ab 1265 devel extra sbuild_0.60.1-1.dsc
 501a55b79d0beff79f8a2c65343c7afc 494103 devel extra sbuild_0.60.1.orig.tar.gz
 4a4dd3598707603b3f76a2378a4504aa 20 devel extra sbuild_0.60.1-1.diff.gz
 8f9f0050404cec1edcdf4b6e550dcd4b 215552 perl extra libsbuild-perl_0.60.1-1_all.deb
 29bcad4875f35c870b6d8cfd5a1e9f9c 217686 devel extra sbuild_0.60.1-1_all.deb
 4a1602e16afd2a4541cd9fc6e27c03e7 219630 devel extra wanna-build_0.60.1-1_all.deb
 7ba599e45ce85aec060a02e169155789 211324 devel extra buildd_0.60.1-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEUEAREDAAYFAkzEhmUACgkQVcFcaSW/uEimPACYyUddg2iR/NHMRZXw2CGug34B
+ACfa401+sLsrFtplCkDQtX5jWKg+XA=
=hZTb
-----END PGP SIGNATURE-----



------------=_1287948974-26090-0--



More information about the Buildd-tools-devel mailing list