Hello community, here is the log from the commit of package withlock for openSUSE:Factory checked in at 2014-03-26 16:42:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/withlock (Old) and /work/SRC/openSUSE:Factory/.withlock.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "withlock" Changes: -------- --- /work/SRC/openSUSE:Factory/withlock/withlock.changes 2014-02-11 11:46:46.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.withlock.new/withlock.changes 2014-03-26 16:42:15.000000000 +0100 @@ -1,0 +2,10 @@ +Tue Mar 25 21:07:09 UTC 2014 - po...@cmdline.net + +- update to 0.3 + * At exit, unlink the lock file only if a lock was actually obtained. + When waiting for a lock (using -w option) and timing out, the file + was removed nevertheless. Thanks Bernhard Wiedemann for finding this + bug and providing such a good test case, so the fix was easy. + See https://bugzilla.novell.com/show_bug.cgi?id=864785 + +------------------------------------------------------------------- Old: ---- withlock-0.2.tar.gz New: ---- withlock-0.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ withlock.spec ++++++ --- /var/tmp/diff_new_pack.XX72ob/_old 2014-03-26 16:42:16.000000000 +0100 +++ /var/tmp/diff_new_pack.XX72ob/_new 2014-03-26 16:42:16.000000000 +0100 @@ -17,7 +17,7 @@ Name: withlock -Version: 0.2 +Version: 0.3 Release: 0 Summary: A locking wrapper script License: Apache-2.0 ++++++ withlock-0.2.tar.gz -> withlock-0.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/withlock-0.2/withlock new/withlock-0.3/withlock --- old/withlock-0.2/withlock 2014-02-10 22:31:01.000000000 +0100 +++ new/withlock-0.3/withlock 2014-03-20 22:17:53.000000000 +0100 @@ -36,7 +36,7 @@ # See --help output for more options. -__version__ = '0.2' +__version__ = '0.3' import os import os.path @@ -49,6 +49,7 @@ import atexit from optparse import OptionParser +got_lock = False class SignalInterrupt(Exception): """Exception raised on SIGTERM and SIGHUP.""" @@ -64,10 +65,11 @@ def cleanup(lockfile): - try: - os.unlink(lockfile) - except: - pass + if got_lock: + try: + os.unlink(lockfile) + except: + pass def main(): @@ -134,6 +136,7 @@ try: fcntl.lockf(lock, fcntl.LOCK_EX | fcntl.LOCK_NB) + got_lock = True break except IOError, e: if e.errno in [ errno.EAGAIN, -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org